創建表空間:
createtablespace表空間名 datafile `存盤路徑`[size integer [K|M]]
[AUTOEXTEND [OFF|ON]];
建議使用語法中默認預設值,
一般一個表空間對應一個資料檔案
一般不自動擴展
調整表空間大小
- 重置資料檔案大小:
alter database datafile表空間檔案路徑resize大小MB;- 向表空間內添加資料檔案
alter tablespace表空間名add datafile存盤路徑size大小MBautoextend on;
表空間只讀:
alter tablespacetp_hrreadonly;
洗掉表空間:
drop tablespacetablespacename[including contents]
[including contents]:存在資料一定添加此字句
良好編程習慣:洗掉前先備份
總結:
- 表空間分為
- 永久性表空間
- 臨時性表空間
- 撤銷表空間
- 創建表空間時一個子系統對應一個表空間
- 建議采用預設引數在不同的磁盤上創建表空間
- 調整表空間的大小
- 調整資料檔案大小
- 添加新資料檔案
- 表空間狀態可以為只讀
- 洗掉表空間時先備份
轉載請註明出處,本文鏈接:https://www.uj5u.com/qita/171750.html
標籤:其他
上一篇:having子句與where子句
