ASM下把datafile从一个diskgroup迁移到另一个diskgroup

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博客 ” ,链接:http://blog.itpub.net/26252696/viewspace-1135323/,如需转载,请注明出处,否则将追究法律责任。

转载于:http://blog.itpub.net/26252696/viewspace-1135323/

  • 0
    点赞
  • 0
    收藏
    觉得还不错? 一键收藏
  • 0
    评论
评论
添加红包

请填写红包祝福语或标题

红包个数最小为10个

红包金额最低5元

当前余额3.43前往充值 >
需支付:10.00
成就一亿技术人!
领取后你会自动成为博主和红包主的粉丝 规则
hope_wisdom
发出的红包
实付
使用余额支付
点击重新获取
扫码支付
钱包余额 0

抵扣说明:

1.余额是钱包充值的虚拟货币,按照1:1的比例进行支付金额的抵扣。
2.余额无法直接购买下载,可以购买VIP、付费专栏及课程。

余额充值