Oracle表空間文件遷移

set ORACLE_SID = ORCL;

sqlplus /nolog

connect sys/1234 as sysdba;

alter tablespace tablespace_name offline;

alter database rename file '......\tablespace_name.dbf'  to '......\tablespace_name.dbf';

alter tablespace tablespace_name online;

recover datafile 'tablespace_name.DBF';

alter tablespace tablespace_name online;

commit;

exit;
SELECT tablespace_name, 
file_id, 
file_name, 
round(bytes / (1024 * 1024), 0) total_space 
FROM dba_data_files 


發表評論
所有評論
還沒有人評論,想成為第一個評論的人麼? 請在上方評論欄輸入並且點擊發布.
相關文章