1. 首页 > ITPUX技术网 > 正文

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

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;
}

本文由风哥教程整理发布,仅用于学习测试使用,转载注明出处:http://www.fgedu.net.cn/10327.html

联系我们

在线咨询:点击这里给我发消息

微信号:itpux-com

工作日:9:30-18:30,节假日休息