oracle表空间下数据文件迁移脚本

教程发布:风哥 教程分类:ITPUX技术网 更新日期:2022-02-12 浏览学习:213

1.rman copy
sqlplus alter tablespace tablespace_name offline;
rman target /
copy datafile 'jiu_dx' to 'xin_dx';
sqlplus 下
alter database rename file 'jiu_dx' to 'xin_dx';
alter tablespace tablespace_name online;
2.脚本
run{
allocate channel c1 type disk;
sql 'alter tablespace tablespace_name offline';
copy datafile ''jiu_dx' to 'xin_dx';
set newname for datafile 6 to 'xin_dx';
switch datafile 6;
sql 'alter tablespace tablespace_name online';
release channel c1;
}

本文标签:
网站声明:本文由风哥整理发布,转载请保留此段声明,本站所有内容将不对其使用后果做任何承诺,请读者谨慎使用!
【上一篇】
【下一篇】