亚洲激情专区-91九色丨porny丨老师-久久久久久久女国产乱让韩-国产精品午夜小视频观看

溫馨提示×

溫馨提示×

您好,登錄后才能下訂單哦!

密碼登錄×
登錄注冊×
其他方式登錄
點擊 登錄注冊 即表示同意《億速云用戶服務條款》

【Oracle Database】 數據庫表空間管理

發布時間:2020-09-04 03:27:53 來源:網絡 閱讀:1515 作者:NOGYMS 欄目:關系型數據庫
創建表空間
SQL>?create?tablespace?soe
datafile?'/u01/app/oracle/oradata/wallet/soe01.dbf'
size?1024M
extent?management?local
uniform?size?1M;

擴展表空間
方法一:在表空間中增加數據文件
SQL>?alter?tablespace?soe
add?datafile?'/u01/app/oracle/oradata/wallet/soe02.dbf'
size?2048M;

方法二:數據文件自動擴展
SQL>?alter?database?datafile?'/u01/app/oracle/oradata/wallet/soe01.dbf'?autoextend?on;

方法三:增加表空間中數據文件的大小
SQL>?alter?database?datafile?'/u01/app/oracle/oradata/wallet/soe01.dbf'?resize?2048M;

移動表空間數據文件
SQL>?alter?tablespace?soe?offline;?

SQL>?host?cp?/u01/app/oracle/oradata/wallet/soe02.dbf?/u02/app/oracle/oradata/wallet

SQL>?alter?tablespace?soe
rename?datafile?'/u01/app/oracle/oradata/wallet/soe02.dbf'
to?'/u02/app/oracle/oradata/wallet/soe02.dbf';

SQL>?alter?tablespace?soe?online;

SQL>?host?rm?-rf?/u01/app/oracle/oradata/wallet/soe02.dbf

刪除表空間
SQL>?drop?tablespace?soe?including?contents?and?datafiles;


創建臨時表空間
SQL>?create?temporary?tablespace?temp01
tempfile?'/u01/app/oracle/oradata/wallet/temp01.dbf'
size?1024M
extent?management?local
uniform?size?1M;

擴展臨時表空間
SQL>?alter?tablespace?temp01???????
add?tempfile?'/u01/app/oracle/oradata/wallet/temp02.dbf'
size?1024M;

查詢數據庫默認臨時表空間
SQL>?col?property_name?for?a40
SQL>?col?property_value?for?a40
SQL>?col?description?for?a40

SQL>?select?*?from?database_properties?where?property_name='DEFAULT_TEMP_TABLESPACE';
PROPERTY_NAME????????????????????????????PROPERTY_VALUE???????????????????????????DESCRIPTION
----------------------------------------?----------------------------------------?----------------------------------------
DEFAULT_TEMP_TABLESPACE??????????????????TEMP?????????????????????????????????????Name?of?default?temporary?tablespace

修改數據庫默認臨時表空間
SQL>?alter?database?default?temporary?tablespace?temp01;

SQL>?select?*?from?database_properties?where?property_name='DEFAULT_TEMP_TABLESPACE';
PROPERTY_NAME????????????????????????????PROPERTY_VALUE???????????????????????????DESCRIPTION
----------------------------------------?----------------------------------------?----------------------------------------
DEFAULT_TEMP_TABLESPACE??????????????????TEMP01???????????????????????????????????Name?of?default?temporary?tablespace

刪除臨時表空間
SQL>?drop?tablespace?temp?including?contents?and?datafiles;


創建UNDO表空間
SQL>?create?undo?tablespace?undotbs2
datafile?'/u01/app/oracle/oradata/wallet/undotbs02.dbf'
size?2048M;

查詢活動UNDO表空間
SQL>?show?parameter?undo_tablespace
NAME?????????????????????????????????TYPE??????????????????????????????VALUE
------------------------------------?---------------------------------?------------------------------
undo_tablespace??????????????????????string????????????????????????????UNDOTBS1

SQL>?select?count(*)?from?dba_undo_extents?where?status?=?'ACTIVE'?and?tablespace_name?=?'UNDOTBS1';
??COUNT(*)
----------
?????????6

修改活動UNDO表空間
SQL>?alter?system?set?undo_tablespace=undotbs2;

SQL>?show?parameter?undo_tablespace
NAME?????????????????????????????????TYPE??????????????????????????????VALUE
------------------------------------?---------------------------------?------------------------------
undo_tablespace??????????????????????string????????????????????????????UNDOTBS2?

刪除UNDO表空間
SQL>?select?count(*)?from?dba_undo_extents?where?status?=?'ACTIVE'?and?tablespace_name?=?'UNDOTBS1';
??COUNT(*)
----------
?????????0
?????????
SQL>?drop?tablespace?undotbs1?including?contents?and?datafiles;


SQL>?@dba_tablespaces.sql

+------------------------------------------------------------------------+
|?Report???:?Tablespaces?????????????????????????????????????????????????|
|?Instance?:?wallet??????????????????????????????????????????????????????|
+------------------------------------------------------------------------+

Tablespace?Name????????????????Status????TS?Type?????????Ext.?Mgt.??Seg.?Mgt.????????TS?Size?(MB)??????????Used?(MB)?Pct.?Used
------------------------------?---------?---------------?----------?----------?------------------?------------------?---------
SYSAUX?????????????????????????ONLINE????PERMANENT???????LOCAL??????AUTO????????????????????2,048????????????????482????????24
UNDOTBS1???????????????????????ONLINE????UNDO????????????LOCAL??????MANUAL??????????????????1,024????????????????114????????11
TEMP???????????????????????????ONLINE????TEMPORARY???????LOCAL??????MANUAL??????????????????1,024?????????????????28?????????3
SYSTEM?????????????????????????ONLINE????PERMANENT???????LOCAL??????MANUAL??????????????????2,048????????????????738????????36
SOE????????????????????????????ONLINE????PERMANENT???????LOCAL??????AUTO????????????????????4,096??????????????1,035????????25
USERS??????????????????????????ONLINE????PERMANENT???????LOCAL??????AUTO????????????????????1,024??????????????????1?????????0
???????????????????????????????????????????????????????????????????????????????------------------?------------------?---------
Average?????????????????????????????????????????????????????????????????????????????????????????????????????????????????????16
Total??????????????????????????????????????????????????????????????????????????????????????11,264??????????????2,398

6?rows?selected.

SQL>?@dba_file_space_usage.sql

+------------------------------------------------------------------------+
|?Report???:?File?Usage??????????????????????????????????????????????????|
|?Instance?:?wallet??????????????????????????????????????????????????????|
+------------------------------------------------------------------------+

Tablespace?Name??????Filename??????????????????????????????????????????????FILE_ID?????File?Size?(MB)??????????Used?(MB)?Pct.?Used
--------------------?--------------------------------------------------?----------?------------------?------------------?---------
SOE??????????????????/u01/app/oracle/oradata/wallet/soe01.dbf????????????????????5??????????????2,048????????????????522????????25
SOE??????????????????/u01/app/oracle/oradata/wallet/soe02.dbf????????????????????6??????????????2,048????????????????513????????25
SYSAUX???????????????/u01/app/oracle/oradata/wallet/sysaux01.dbf?????????????????2??????????????2,048????????????????482????????23
SYSTEM???????????????/u01/app/oracle/oradata/wallet/system01.dbf?????????????????1??????????????2,048????????????????738????????36
TEMP?????????????????/u01/app/oracle/oradata/wallet/temp01.dbf???????????????????1??????????????1,024?????????????????28?????????2
UNDOTBS1?????????????/u01/app/oracle/oradata/wallet/undotbs01.dbf????????????????3??????????????1,024????????????????114????????11
USERS????????????????/u01/app/oracle/oradata/wallet/users01.dbf??????????????????4??????????????1,024??????????????????1?????????0
???????????????????????????????????????????????????????????????????????????????????------------------?------------------?---------
Average?????????????????????????????????????????????????????????????????????????????????????????????????????????????????????????17
Total??????????????????????????????????????????????????????????????????????????????????????????11,264??????????????2,398

7?rows?selected.


向AI問一下細節

免責聲明:本站發布的內容(圖片、視頻和文字)以原創、轉載和分享為主,文章觀點不代表本網站立場,如果涉及侵權請聯系站長郵箱:is@yisu.com進行舉報,并提供相關證據,一經查實,將立刻刪除涉嫌侵權內容。

AI

南城县| 仁寿县| 正安县| 西宁市| 扬中市| 张家川| 唐山市| 石嘴山市| 册亨县| 西华县| 东城区| 西林县| 九台市| 东兰县| 台东县| 永城市| 辰溪县| 水城县| 南溪县| 洱源县| 剑川县| 香格里拉县| 阳新县| 社旗县| 常山县| 门头沟区| 高淳县| SHOW| 琼海市| 姜堰市| 盐池县| 梅州市| 孝义市| 镇安县| 集安市| 平利县| 双辽市| 南充市| 图片| 新巴尔虎右旗| 浙江省|