一、 迁移步骤
1 确定控制文件位置
SQL> select name from v$controlfile;
NAME
--------------------------------------------------
/oradata/V11/control01.ctl
SQL> shutdown immediate;
SQL> startup nomount;
2 拷贝
$ rman target /
RMAN> restore controlfile to '/recovery_area/V11/control02.ctl' from '/oradata/V11/control01.ctl';
--OR--
Copy the controlfile using OS-commands
% cp /oradata/V11/control01.ctl /recovery_area/V11/control02.ctl
---Or----
dd if=/path/to/source_RLV of=/path/to/target_RLV bs=4096 skip=? seek=?
3修改控制文件
SQL >alter system set control_files=’/recovery_area/V11/control02.ctl’, ‘/oradata/V11/control01.ctl' scope=spfile;
Note: If you have an init.ora simply update this to reflect the changes.
4 启动数据库
SQL> startup mount force;
-- Note: selecting from v$controlfile will reflect the changes.
SQL> select name from v$controlfile;
NAME
-------------------------------------
/recovery_area/V11/control02.ctl
/oradata/V11/control01.ctl
SQL> alter database open;
二、 迁移方式选择
迁移方式 | 支持类型 |
Rman restore controlfile to '< NEW_PATH>' from ''; | File system asm Raw Logical Volumes 之前都支持 |
cp | File system |
Asmcmd cp +dg1/db11g/controlfile/Current.256.651275203 +dg1/db11g/controlfile/cf_copy | Asm |
Dd dd if=/path/to/source_RLV of=/path/to/target_RLV bs=4096 skip=? seek=? | Raw Logical Volumes File system |
备注:
目的路径为ASM RMAN方式分两种:
1 Rman 不指定名称
RMAN>restore controlfile to '' from '';
Using ASMCMD:
$ asmcmd
ASMCMD> cd
ASMCMD> find -t controlfile . *
+DG1/P10R2/CONTROLFILE/backup.308.577785757
ASMCMD>
2 Rman 指定名称
Asm实例下创建目录
SQL> alter diskgroup DG1 add directory '+DG1/P10R2/CONTROLFILE';
或
ASMCMD>cd dg1
ASMCMD>mkdir controlfile
复制
restore controlfile to '+DG1/PROD/controlfile/control02.ctl' from '/oradata2/102b/oradata/P10R2/control01.ctl';
来自 “ ITPUB博客 ” ,链接:http://blog.itpub.net/15747463/viewspace-1419015/,如需转载,请注明出处,否则将追究法律责任。
转载于:http://blog.itpub.net/15747463/viewspace-1419015/