Oracle10g New Feature -- 5.Temporary Tablespace Group
Oracle10g引入了臨時表空間組的概念,和單個的臨時表空間相比,引入組以後允許資料庫指定多個預設的臨時表空間,同時相同使用者的不同會話可以使用不同的臨時表空間,並且單個SQL執行時可以利用多個臨時表空間進行排序(自動呼叫多個臨時表空間嗎?還無從得知)。
目前感覺這個新特性作用並不是很大,主要是以前temp表空間出的問題不多。不知道真正用起來時如何。
建立組、增刪表空間,指定組都是相對簡單的操作
[@more@]Temporary Tablespace Group
· Create temporary tablespace group implicitly
SQL>create temporary tablespace LMTEMP1 tempfile 'D:ORACLE10ORCLtemp1_01.dbf' size 50M tablespace group GROUP1;
· Add a tablespace to group
SQL>create temporary tablespace lmtemp2 tempfile 'D:ORACLE10ORCLtemp1_02.dbf' size 2M tablespace group group1;
· Determine temporary tablespace groups SQL> select * from dba_tablespace_groups;
GROUP_NAME TABLESPACE_NAME
-------------------- ------------------------------
GROUP1 LMTEMP1
GROUP1 LMTEMP2
· Remove a temporary tablespace from a temporary tablespace group. SQL>ALTER TABLESPACE LMTEMP1 TABLESPACE GROUP ‘‘;
· Change temporary tablespace groups SQL> alter tablespace LMTEMP1 tablespace group GROUP2 ;
SQL> select * from dba_tablespace_groups;
GROUP_NAME TABLESPACE_NAME
------------------------------ ------------------------------
GROUP2 LMTEMP1
GROUP1 LMTEMP2
· Assign a user to a default temporary tablespace group SQL> ALTER USER scott TEMPORARY TABLESPACE tempgroup_A;
· Set the group as the database default temporary tablespace SQL>alter database default temporary tablespace group1;
Database altered.
SQL>select * from database_properties where property_name like 'DEFAULT_TEMP%'
PROPERTY_NAME PROPERTY_VALUE DESCRIPTION
------------------------- ---------------------------- ---------------------
DEFAULT_TEMP_TABLESPACE GROUP1 Name of defaulttemporary tablespace
· Determine which temporary tablespaces were used SQL> select username, session_num, tablespace from v$sort_usage;
USERNAME SESSION_NUM TABLESPACE
------------------------------ ----------- -----------
ZHYUH 387 TEMP
SQL> select * from dba_tablespace_groups;
GROUP_NAME TABLESPACE_NAME
-------------------- ------------------------------
GROUP1 LMTEMP1
GROUP1 LMTEMP2
· Remove a temporary tablespace from a temporary tablespace group. SQL>ALTER TABLESPACE LMTEMP1 TABLESPACE GROUP ‘‘;
· Change temporary tablespace groups SQL> alter tablespace LMTEMP1 tablespace group GROUP2 ;
SQL> select * from dba_tablespace_groups;
GROUP_NAME TABLESPACE_NAME
------------------------------ ------------------------------
GROUP2 LMTEMP1
GROUP1 LMTEMP2
· Assign a user to a default temporary tablespace group SQL> ALTER USER scott TEMPORARY TABLESPACE tempgroup_A;
· Set the group as the database default temporary tablespace SQL>alter database default temporary tablespace group1;
Database altered.
SQL>select * from database_properties where property_name like 'DEFAULT_TEMP%'
PROPERTY_NAME PROPERTY_VALUE DESCRIPTION
------------------------- ---------------------------- ---------------------
DEFAULT_TEMP_TABLESPACE GROUP1 Name of defaulttemporary tablespace
· Determine which temporary tablespaces were used SQL> select username, session_num, tablespace from v$sort_usage;
USERNAME SESSION_NUM TABLESPACE
------------------------------ ----------- -----------
ZHYUH 387 TEMP
SQL> alter tablespace LMTEMP1 tablespace group GROUP2 ;
SQL> select * from dba_tablespace_groups;
GROUP_NAME TABLESPACE_NAME
------------------------------ ------------------------------
GROUP2 LMTEMP1
GROUP1 LMTEMP2
· Assign a user to a default temporary tablespace group SQL> ALTER USER scott TEMPORARY TABLESPACE tempgroup_A;
· Set the group as the database default temporary tablespace SQL>alter database default temporary tablespace group1;
Database altered.
SQL>select * from database_properties where property_name like 'DEFAULT_TEMP%'
PROPERTY_NAME PROPERTY_VALUE DESCRIPTION
------------------------- ---------------------------- ---------------------
DEFAULT_TEMP_TABLESPACE GROUP1 Name of defaulttemporary tablespace
· Determine which temporary tablespaces were used SQL> select username, session_num, tablespace from v$sort_usage;
USERNAME SESSION_NUM TABLESPACE
------------------------------ ----------- -----------
ZHYUH 387 TEMP
SQL>alter database default temporary tablespace group1;
Database altered.
SQL>select * from database_properties where property_name like 'DEFAULT_TEMP%'
PROPERTY_NAME PROPERTY_VALUE DESCRIPTION
------------------------- ---------------------------- ---------------------
DEFAULT_TEMP_TABLESPACE GROUP1 Name of defaulttemporary tablespace
· Determine which temporary tablespaces were used SQL> select username, session_num, tablespace from v$sort_usage;
USERNAME SESSION_NUM TABLESPACE
------------------------------ ----------- -----------
ZHYUH 387 TEMP
來自 “ ITPUB部落格 ” ,連結:http://blog.itpub.net/207/viewspace-778740/,如需轉載,請註明出處,否則將追究法律責任。
相關文章
- Oracle10g New Feature -- 8. Tablespace ManagementOracle
- Oracle10g New Feature -- 4. Flashback DatabaseOracleDatabase
- Oracle10g New Feature -- 3.Flashback TableOracle
- Oracle10g New Feature -- 2.Flashback RecordsOracle
- Oracle10g New Feature -- 11. Wait InterfaceOracleAI
- Oracle10g New Feature -- 7. Rollback MonitoringOracle
- Oracle10g New Feature -- 6. Oracle Data PumpOracle
- oracle10g new feature -- 1. SqlplusOracleSQL
- Oracle10g New Feature:CRS(Cluster Ready Services) (zt)Oracle
- Oracle10g New Feature -- 9. ASM (Automatic Storage Management)OracleASM
- java new featureJava
- Oracle10g New Feature -- 14. OEM ( Oracle Enterprise Manager)Oracle
- Oracle10g New Feature -- 13. Automatic Shared Memory ManagementOracle
- Oracle10g New Feature --12. ASSM ( Automatic Segment Space Management )OracleSSM
- Oracle10g新特性:臨時表空間組(temporary tablespace group)Oracle
- Oracle10g New Feature -- 10. AWR (Automatic Workload Repository)Oracle
- oracle10g new feature:對expdp並行方式的幾個測試Oracle並行
- 12c new feature
- 版本新特性(new feature)
- new feature ——>mysql to oracle MigrationMySqlOracle
- How to Rename Tablespace In Oracle10gOracle
- How To Move The DB Audit Trails To A New TablespaceAI
- Oracle Database 12C New FeatureOracleDatabase
- 11g New Feature: Health monitor
- oracle10g ASM transport_tablespaceOracleASM
- Oracle 12c Recover Table New FeatureOracle
- oracle10g中的bigfile tablespaceOracle
- oracle 12c new feature 列不可見Oracle
- oracle10g undo tablespace相關知識Oracle
- j2ee1.4 new feature請教banq
- Oracle10g New Features(1)Oracle
- 11g New Feature: Health monitor (Doc ID 466920.1)
- oracle 11g ocp new feature 1z0-050Oracle
- Test Negtive Role Set in a stream environmnet- 10g_new_feature
- oracle 12cR2 new feature dbca 命令可以建立standby 庫Oracle
- Oracle10g新增的檢視dba_tablespace_usage_metricsOracle
- Oracle10新特性:臨時表空間組(temporary tablespace group)Oracle
- 10G新特性: 臨時表空間組(temporary tablespace group)