方法:1、用“drop tablespace temp including contents and datafiles”刪除原來的臨時(shí)表空間;2、用“create temporary tablespace”語(yǔ)句創(chuàng)建新的臨時(shí)表空間。
本教程操作環(huán)境:Windows10系統(tǒng)、oracle 11g版、Dell G3電腦。
oracle怎么修改臨時(shí)表空間
–查詢當(dāng)前數(shù)據(jù)庫(kù)默認(rèn)臨時(shí)表空間名
select?*?from?database_properties?where?property_name='DEFAULT_TEMP_TABLESPACE';
–創(chuàng)建新的臨時(shí)表空間
create?temporary?tablespace?temp01???tempfile?'/oradata/temp01.dbf'?size?2G?autoextend?on;
–修改默認(rèn)表空間為新建的臨時(shí)表空間
alter?database?default?temporary?tablespace?temp01;
–查看用戶當(dāng)前使用的臨時(shí)表空間
select?username,temporary_tablespace?from?dba_users;
–刪除原來的臨時(shí)表空間
drop?tablespace?temp?including?contents?and?datafiles;
–查看所有表空間名確認(rèn)臨時(shí)表空間是否已刪除
select?tablespace_name?from?dba_tablespaces;
擴(kuò)展:
–臨時(shí)表空間添加數(shù)據(jù)文件
alter?tablespace?temp01?add?tempfile?'/oradata/temp02.dbf'?size?2G?autoextend?on;
–修改臨時(shí)表空間數(shù)據(jù)文件大小
alter?database?tempfile?'/oradata/temp02.dbf'?resize?4G;
推薦教程:《Oracle視頻教程》
? 版權(quán)聲明
文章版權(quán)歸作者所有,未經(jīng)允許請(qǐng)勿轉(zhuǎn)載。
THE END
喜歡就支持一下吧
相關(guān)推薦