如何設置oracle表空間自動擴展


一、表空間自動擴展的好處

1.數據文件自動擴展的好處
1)不會出現因為沒有剩余空間可以利用到數據無法寫入
2)盡量減少人為的維護

二、設置表空間自動擴展的方法

1、查看表空間情況

SQL>select tablespace_name,file_name,autoextensible from dba_data_files where tablespace_name = '表空間名稱';

2、修改表空間數據文件,使其達到表空間自動擴展

SQL>alter database datafile '/u01/app/oracle/oradata/orcl/user01.dbf' autoextend on;

3、對修改結果進行驗證

SQL>select tablespace_name,file_name,autoextensible from dba_data_files where tablespace_name = '表空間名稱';

三、語法總結

開啟自動擴展功能語法:

開啟自動擴展功能語法:
alter database datafile '對應的數據文件路徑信息' autoextend on;
關閉自動擴展功能語法:
alter database datafile '對應的數據文件路徑信息' autoextend off;

 

 


免責聲明!

本站轉載的文章為個人學習借鑒使用,本站對版權不負任何法律責任。如果侵犯了您的隱私權益,請聯系本站郵箱yoyou2525@163.com刪除。



 
粵ICP備18138465號   © 2018-2025 CODEPRJ.COM