oracle 修改默認臨時表空間


--查詢當前數據庫默認臨時表空間名

select * from database_properties where property_name='DEFAULT_TEMP_TABLESPACE';

--創建新的臨時表空間

create temporary tablespace temp01   tempfile '/oradata/temp01.dbf' size 2G autoextend on;

--修改默認表空間為新建的臨時表空間

alter database default temporary tablespace temp01;

--查看用戶當前使用的臨時表空間

select username,temporary_tablespace from dba_users;

--刪除原來的臨時表空間

drop tablespace temp including contents and datafiles;

--查看所有表空間名確認臨時表空間是否已刪除

select tablespace_name from dba_tablespaces; 

擴展:

--臨時表空間添加數據文件

alter tablespace temp01 add tempfile '/oradata/temp02.dbf' size 2G autoextend on;

--修改臨時表空間數據文件大小

alter database tempfile '/oradata/temp02.dbf' resize 4G;

 


免責聲明!

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



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