select file_name,tablespace_name from dba_data_files;SQL> alter tablespace users offline;SQL> s..."/>
您好,登錄后才能下訂單哦!
1 數(shù)據(jù)文件的狀態(tài)設(shè)置為offline狀態(tài)
表空間置為offline
SQL> select file_name,tablespace_name from dba_data_files;
SQL> alter tablespace users offline;
SQL> select name,status from v$datafile;
NAME STATUS
-------------------------------------------------- -------
/u01/app/oracle/oradata/ORA11GR2/system01.dbf SYSTEM
/u01/app/oracle/oradata/ORA11GR2/sysaux01.dbf ONLINE
/u01/app/oracle/oradata/ORA11GR2/undotbs01.dbf ONLINE
/u01/app/oracle/oradata/ORA11GR2/users01.dbf OFFLINE
/u01/app/oracle/oradata/ORA11GR2/example01.dbf ONLINE
2 操作系統(tǒng)層面完成真正的改名操作
3 數(shù)據(jù)庫層面修改數(shù)據(jù)文件名
alter database rename file '/u01/app/oracle/oradata/ORA11GR2/users01.dbf' to '/u01/app/oracle/oradata/ORA11GR2/users01.dbf.bk';
4 表空間重新置為online狀態(tài)
alter tablespace users online;
SQL> select name,status from v$datafile;
免責(zé)聲明:本站發(fā)布的內(nèi)容(圖片、視頻和文字)以原創(chuàng)、轉(zhuǎn)載和分享為主,文章觀點不代表本網(wǎng)站立場,如果涉及侵權(quán)請聯(lián)系站長郵箱:is@yisu.com進(jìn)行舉報,并提供相關(guān)證據(jù),一經(jīng)查實,將立刻刪除涉嫌侵權(quán)內(nèi)容。