臨時表空間temporary tablespace相關操作

wisdomone1發表於2013-06-26


---如果已經作了setnewname操作,則會提示已作,會提示略過;
run{
set newname for tempfile  '/oracle/app/oracle/oradata/zxy/newtemp01_pos.dbf' to '/oracle/newpos_temp01.dbf';
set newname for tempfile  '/oracle/temp02.dbf' to '/oracle/newpos_temp02.dbf';
restore database;
switch tempfile all;
}


---資料庫open刪除臨時表空間某個臨時檔案
SQL> alter database tempfile '/oracle/newpos_temp02.dbf' drop including datafiles;

Database altered.

---rename file可以在mount狀態作,但臨時檔案先要物理複製過去才可以,不然報錯
SQL> alter database rename file '/oracle/app/oracle/oradata/zxy/newtemp01.dbf' to '/oracle/newtemp01_pos.dbf';
alter database rename file '/oracle/app/oracle/oradata/zxy/newtemp01.dbf' to '/oracle/newtemp01_pos.dbf'
*
ERROR at line 1:
ORA-01511: error in renaming log/data files
ORA-01516: nonexistent log file, data file, or temporary file
"/oracle/app/oracle/oradata/zxy/newtemp01.dbf"

來自 “ ITPUB部落格 ” ,連結:http://blog.itpub.net/9240380/viewspace-764887/,如需轉載,請註明出處,否則將追究法律責任。

相關文章