手机版
你好,游客 登录 注册
背景:
阅读新闻

RMAN 迁移ASM到异机文件系统实战

[日期:2012-12-30] 来源:Linux社区  作者:plwsab6000 [字体:大 中 小]

Rman 默认启动了一个名字为DUMMY的实例

[Oracle@targetdb target_bk]$ rman target /

Recovery Manager: Release 10.2.0.1.0 - Production on Sun Dec 30 04:40:27 2012

Copyright (c) 1982, 2005, Oracle.  All rights reserved.

connected to target database: DUMMY (not mounted)

RMAN>

[oracle@targetdb target_bk]$ ll -hr

total 596M

-rw-r--r-- 1 oracle oinstall  96K Dec 30 03:57 full_database0qnu4jb5_1_1

-rw-r--r-- 1 oracle oinstall 6.8M Dec 30 03:57 full_database0pnu4jb4_1_1

-rw-r--r-- 1 oracle oinstall 216M Dec 30 03:57 full_database0onu4ja0_1_1

-rw-r--r-- 1 oracle oinstall 373M Dec 30 03:57 full_database0nnu4ja0_1_1

-rw-r--r-- 1 oracle oinstall 2.5K Dec 30 03:56 archivelog_0snu4jbf_1_1

-rw-r--r-- 1 oracle oinstall 554K Dec 30 03:56 archivelog_0rnu4jbf_1_1

 

参数文件在哪个备份集呢?可以到原库上通过list backup 查看,有经验的查看备份集大小即可判断出。

[oracle@targetdb target_bk]$ rman target /

Recovery Manager: Release 10.2.0.1.0 - Production on Sun Dec 30 04:41:43 2012

Copyright (c) 1982, 2005, Oracle.  All rights reserved.

connected to target database: DUMMY (not mounted)

RMAN> restore spfile from '/home/oracle/target_bk/full_database0qnu4jb5_1_1';

 

Starting restore at 30-DEC-12

using target database control file instead of recovery catalog

allocated channel: ORA_DISK_1

channel ORA_DISK_1: sid=36 devtype=DISK

channel ORA_DISK_1: autobackup found: /home/oracle/target_bk/full_database0qnu4jb5_1_1

channel ORA_DISK_1: SPFILE restore from autobackup complete

Finished restore at 30-DEC-12

 

RMAN> shutdown immediate;

 

Oracle instance shut down

 

RMAN>

 

恢复控制文件

使用刚刚恢复出来的参数文件启库:

[oracle@targetdb target_bk]$ rman target /

 

Recovery Manager: Release 10.2.0.1.0 - Production on Sun Dec 30 04:45:54 2012

 

Copyright (c) 1982, 2005, Oracle.  All rights reserved.

 

connected to target database (not started)

 

RMAN> startup nomount

 

Oracle instance started

 

Total System Global Area    167772160 bytes

 

Fixed Size                    1218316 bytes

Variable Size                75499764 bytes

Database Buffers              88080384 bytes

Redo Buffers                  2973696 bytes

 

RMAN>  restore controlfile to '/u01/oracle/oradata/sourcedb/controlfile01.ctl' from '/home/oracle/target_bk/full_database0pnu4jb4_1_1';

 

Starting restore at 30-DEC-12

using channel ORA_DISK_1

 

channel ORA_DISK_1: restoring control file

channel ORA_DISK_1: restore complete, elapsed time: 00:00:01

Finished restore at 30-DEC-12

 

到sqlplus 下修改参数文件位置:

SQL> show parameter control

 

NAME                                TYPE        VALUE

------------------------------------ ----------- ------------------------------

control_file_record_keep_time        integer    7

control_files                        string      +DG1/sourcedb/controlfile/cont

                                                rol01.ctl, +DG1/sourcedb/contr

                                                olfile/control02.ctl

 

SQL> alter system set control_files='/u01/oracle/oradata/sourcedb/control01.ctl','/u01/oracle/oradata/sourcedb/control02.ctl' scope=spfile;

System altered.

linux
相关资讯       RMAN  ASM 
本文评论   查看全部评论 (0)
表情: 表情 姓名: 字数

       

评论声明
  • 尊重网上道德,遵守中华人民共和国的各项有关法律法规
  • 承担一切因您的行为而直接或间接导致的民事或刑事法律责任
  • 本站管理人员有权保留或删除其管辖留言中的任意内容
  • 本站有权在网站内转载或引用您的评论
  • 参与本评论即表明您已经阅读并接受上述条款