oracle實驗記錄 (bigfile tablespace)
關於建立tablespace的幾個問題(其中有很多引數就不寫了)
SQL> create bigfile tablespace testbig datafile 'd:\bigtestfile.ora' size 2m;
Tablespace created.
segment space management default為manual,而bigfile tablespace 段空間管理方式必須為auto(用bitmap)
問題來了 上面建立的 default 應該為 manual 但卻成功建立了
SQL> create bigfile tablespace testbig2 datafile 'd:\bigtestfile2.ora' size 2m s
egment space management manual;
create bigfile tablespace testbig2 datafile 'd:\bigtestfile2.ora' size 2m segmen
t space management manual
*
ERROR at line 1:
ORA-32772: BIGFILE is invalid option for this type of tablespace
這個例子中寫為manual卻不成功(defalut值)
SQL> create bigfile tablespace testbig2 datafile 'd:\bigtestfile2.ora' size 2m s
egment space management auto;
Tablespace created. auto後可以
SQL>
SQL> select tablespace_name, extent_management,segment_space_management from use
r_tablespaces;
TABLESPACE_NAME EXTENT_MAN SEGMEN
------------------------------ ---------- ------
SYSTEM LOCAL MANUAL
UNDOTBS1 LOCAL MANUAL
SYSAUX LOCAL AUTO
TEMP LOCAL MANUAL
USERS LOCAL AUTO
EXAMPLE LOCAL AUTO
TEST LOCAL MANUAL
TEST3 LOCAL MANUAL
TESTBIG LOCAL AUTO*****************
TESTBIG2 LOCAL AUTO
看出 這個建立時候未用default manual 是BUG?還是oracle太智慧根據SQL字面 自動改成AUTO?
SQL> alter tablespace testbig add datafile 'd:\big1.dbf' size 1m;
alter tablespace testbig add datafile 'd:\big1.dbf' size 1m
*
ERROR at line 1:
ORA-32771: cannot add file to bigfile tablespace
小結:bigfile tablespace 段空間管理必為auto 且 只能有一個datafile
建立temptablespace
temptable 區分配必須為 uniform
SQL> create temporary tablespace temptest tempfile 'd:\testtemp.dbf' size 10m un
iform. size 64k ;
Tablespace created.
SQL> create temporary tablespace temptest2 tempfile 'd:\testtemp2.dbf' size 10m
autoallocate ;
create temporary tablespace temptest2 tempfile 'd:\testtemp2.dbf' size 10m autoa
llocate
*
ERROR at line 1:
ORA-25139: invalid option for CREATE TEMPORARY TABLESPACE
SQL> create temporary tablespace temptest2 tempfile 'd:\testtemp2.dbf' size 10m;
Tablespace created.
SQL> select tablespace_name, next_extent,segment_space_management,allocation_typ
e from user_tablespaces;
TABLESPACE_NAME NEXT_EXTENT SEGMEN ALLOCATIO
------------------------------ ----------- ------ ---------
SYSTEM MANUAL SYSTEM
UNDOTBS1 MANUAL SYSTEM
SYSAUX AUTO SYSTEM
TEMP 1048576 MANUAL UNIFORM
USERS AUTO SYSTEM
EXAMPLE AUTO SYSTEM
TEST MANUAL SYSTEM
TEST3 MANUAL SYSTEM
TESTBIG AUTO SYSTEM
TESTBIG2 AUTO SYSTEM
TEMPTEST 65536 MANUAL UNIFORM
TABLESPACE_NAME NEXT_EXTENT SEGMEN ALLOCATIO
------------------------------ ----------- ------ ---------
TEMPTEST2 1048576 MANUAL UNIFORM
12 rows selected.
SQL> create temporary tablespace temptest3 tempfile 'd:\testtemp3.dbf' size 10m
segment space management auto;
create temporary tablespace temptest3 tempfile 'd:\testtemp3.dbf' size 10m segme
nt space management auto
*
ERROR at line 1:
ORA-30573: AUTO segment space management not valid for this type of tablespace
SQL> create temporary tablespace temptest3 tempfile 'd:\testtemp3.dbf' size 10m
segment space management manual;必須為manual
Tablespace created.
分析 :分割槽 必須uniform,當不寫時候沒用default值 default uniform. 1m ,segment space management 必須為manual (default)
bigfile tempspace
段管理方式 必須為manual 用freelist(default)
分割槽大小必須 uniform
SQL> create bigfile temporary tablespace temptest4 tempfile 'd:\testtemp4.dbf' s
ize 10m segment space management manual;
Tablespace created.
SQL> create bigfile temporary tablespace temptest5 tempfile 'd:\testtemp5.dbf' s
ize 10m segment space management auto;
create bigfile temporary tablespace temptest5 tempfile 'd:\testtemp5.dbf' size 1
0m segment space management auto
*
ERROR at line 1:
ORA-30573: AUTO segment space management not valid for this type of tablespace
dufault 區分配方式為autoallocate
SQL> create bigfile temporary tablespace temptest5 tempfile 'd:\temptest5.dbf' s
ize 10m EXTENT MANAGEMENT LOCAL autoallocate ;
create bigfile temporary tablespace temptest5 tempfile 'd:\temptest5.dbf' size 1
0m EXTENT MANAGEMENT LOCAL autoallocate
*
ERROR at line 1:
ORA-25139: invalid option for CREATE TEMPORARY TABLESPACE
SQL> create bigfile temporary tablespace temptest5 tempfile 'd:\temptest5.dbf' s
ize 10m EXTENT MANAGEMENT LOCAL uniform ;
Tablespace created.
總結:bigfile tempspace 也必須uniform
SQL> create tablespace test6 datafile 'd:\test6b.dbf' size 1m,'d:\test6a.dbf' si
ze 1m;
Tablespace created.建立時候多datafile ,分開
SQL> drop tablespace test3 including contents and datafiles;
Tablespace dropped.
SQL> drop tablespace test5 including contents and datafiles;
Tablespace dropped.
SQL> drop tablespace test6 including contents and datafiles;
Tablespace dropped.
SQL> alter tablespace test rename to xhtest;~10G
Tablespace altered.
SQL>
來自 “ ITPUB部落格 ” ,連結:http://blog.itpub.net/12020513/viewspace-610592/,如需轉載,請註明出處,否則將追究法律責任。
相關文章
- 【TABLESPACE】Oracle表空間最佳實踐Oracle
- Oracle OCP(48):UNDO TABLESPACEOracle
- 大資料實驗記錄大資料
- mysql load 相關實驗記錄MySql
- 【TABLESPACE】Oracle 表空間結構說明Oracle
- Bigfile ---- awesome-goGo
- STM32F207DAC實驗記錄
- SEO 經驗記錄
- 【BUG】Oracle12c tablespace io statistics missing from awr reportOracle
- overlay網路隔離實驗失敗記錄
- 《learn to count everything》論文閱讀、實驗記錄
- Oracle實驗(04):floatOracle
- STM32F207串列埠實驗記錄串列埠
- Oracle實驗(01):字元 & 位元組Oracle字元
- Oracle實驗(03):number的使用Oracle
- oracle awr快照點不記錄問題Oracle
- 專案重構經驗記錄
- Laravel 使用個人經驗記錄Laravel
- Oracle實驗(02):轉換 & 轉譯Oracle
- Oracle實驗(05):時間型別Oracle型別
- 【Oracle 恢復表空間】 實驗Oracle
- 實驗 20:備忘錄模式模式
- Oracle遊標遍歷%rowtype中的記錄Oracle
- Oracle 41億資料量表建立索引記錄Oracle索引
- 【BUFFER】Oracle buffer cache之 latch 學習記錄Oracle
- MySQL 5.7 InnoDB Tablespace EncryptionMySql
- 很漂亮的Python驗證碼(記錄)Python
- Laravel unique驗證 排除當前記錄Laravel
- oracle 主外來鍵關係及實驗Oracle
- Oracle實驗8--Merge與歸檔Oracle
- 使用ogg 從oracle 同步mysql遇到問題記錄OracleMySql
- 11.21實驗 20:備忘錄模式模式
- 使用DBUA升級 Oracle 11.2.0.4到Oracle 19C的問題記錄Oracle
- Git命令實操記錄Git
- 個人實驗程式碼記錄 | 數字影像處理實驗3·影像直方圖與均衡化處理直方圖
- Oracle實驗6--掌握Oracle資料庫的日誌操作Oracle資料庫
- Oracle之多行記錄變一行記錄,行變列,並排序(wmsys.wm_concat)Oracle排序
- 【記錄】KgCaptcha滑動拼圖驗證碼GCAPT
- Laravel——驗證碼認證學習記錄Laravel