oracle建立暫存資料表空間組,oracle建立

來源:互聯網
上載者:User

oracle建立暫存資料表空間組,oracle建立
在oracle11g以後,使用者可以建立暫存資料表空間組,一個暫存資料表空間組中可以包含一個或多個暫存資料表空間。
暫存資料表空間組中必須由至少一個暫存資料表空間組成,並且無明確的最大數量限制。
如果刪除一個暫存資料表空間組的所有成員,該組也自動被刪除。
暫存資料表空間的名字不能與暫存資料表空間組的名字相同。
在給使用者指派的一個暫存資料表空間時,可以使用暫存資料表空間組的名字代替實際的暫存資料表空間名;在給資料庫分配預設暫存資料表空間時,也可以使用暫存資料表空間組的名字。
暫存資料表空間組
建立暫存資料表空間組
暫存資料表空間組不需要特別建立,只需要在建立暫存資料表空間時,
使用teblespace group語句為其指定一個組即可。


查看暫存資料表空間組資訊。
資料字典dba_tablespace_grops


移動暫存資料表空間
使用alter tablespace語句


SQL> create temporary tablespace tempgroup
  2  tempfile 'f:\oracledata\tempgroup01.dbf' size 5m
  3  tablespace group group01;
資料表空間已建立。
SQL> select * from dba_tablespace_groups;
GROUP_NAME                     TABLESPACE_NAME
------------------------------ ------------------------------
GROUP01                        TEMPGROUP


SQL> create temporary tablespace tempgroup02
  2  tempfile 'f:\oracledata\tempgroup02.dbf' size 5m
  3  tablespace group group02;
資料表空間已建立。
SQL> select * from dba_tablespace_groups;
GROUP_NAME                     TABLESPACE_NAME
------------------------------ ------------------------------
GROUP01                        TEMPGROUP
GROUP02                        TEMPGROUP02


SQL> alter tablespace tempgroup tablespace group group02;
資料表空間已更改。
SQL> select * from dba_tablespace_groups;
GROUP_NAME                     TABLESPACE_NAME
------------------------------ ------------------------------
GROUP02                        TEMPGROUP
GROUP02                        TEMPGROUP02

相關文章

A Free Trial That Lets You Build Big!

Start building with 50+ products and up to 12 months usage for Elastic Compute Service

  • Sales Support

    1 on 1 presale consultation

  • After-Sales Support

    24/7 Technical Support 6 Free Tickets per Quarter Faster Response

  • Alibaba Cloud offers highly flexible support services tailored to meet your exact needs.