首页 > 数据库 > Oracle > ASM下把datafile从一个diskgroup迁移到另一个diskgroup


原创 Oracle 作者:lincle101 时间:2014-04-03 12:01:12 0 删除 编辑
step 1  tablespace offline

alter tablespace tablespacename offline;

step 2 datafile offline

alter database datafile '$DatafilePath/datafilename' offline

step 3 use rman tools move datafile

rman target /

RMAN> copy datafile '$oldPath/datafilename'  to '$newpath/rm_dat_ts1_01.dbf';
Starting backup at 2014-04-03 18:52:41
using target database control file instead of recovery catalog
allocated channel: ORA_DISK_1
channel ORA_DISK_1: SID=637 instance=**** device type=DISK
channel ORA_DISK_1: starting datafile copy
input datafile file number=00032 name=+DATA/*****.dbf
output file name=+DATA2/coredb/datafile/rm_dat_ts1_01.dbf tag=TAG20140403T185243 RECID=1 STAMP=843936775
channel ORA_DISK_1: datafile copy complete, elapsed time: 00:00:15
Finished backup at 2014-04-03 18:52:58

step 4 rename datafile

RMAN> run {
2> set newname for datafile '$oldPath/datafilename'  to '$newpath/rm_dat_ts1_01.dbf';;
3> switch datafile all;
4> }

step 5 online datafile

alter database datafile '$NewPath/datafilename' online;

step 6 online tablespace

alter tablespace tablespacename online;

来自 “ ITPUB博客 ” ,链接:,如需转载,请注明出处,否则将追究法律责任。

请登录后发表评论 登录


  • 博文量
  • 访问量