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