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

Oracle备份恢复之RMAN恢复到异机

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

二 恢复参数文件及控制文件
 
 
 
 1 配置新主机上的Oracle_SID
 
  export  ORACLE_SID=CRM
 
 
 
 2 在新主机上发起rman连接
 
 
 
[oracle@oracle dbs]$ rman target /
 
 
 
Recovery Manager: Release 10.2.0.1.0 - Production on Mon Dec 10 05:49:11 2012
 
 
 
Copyright (c) 1982, 2005, Oracle. All rights reserved.
 
 
 
connected to target database (not started)
 
 
 
3  设置dbid 并启动实例到nomount状态
 
 
 
RMAN> set dbid 3601019238
 
 
 
executing command: SET DBID
 
 
 
RMAN> startup nomount
 
 
 
startup failed: ORA-01078: failure in processing system parameters
 
LRM-00109: could not open parameter file '/oracle/app/db1/dbs/initCRM.ora'
 
 
 
starting Oracle instance without parameter file for retrival of spfile
 
Oracle instance started
 
 
 
Total System Global Area    159383552 bytes
 
 
 
Fixed Size                    2019224 bytes
 
Variable Size                67108968 bytes
 
Database Buffers              83886080 bytes
 
Redo Buffers                  6369280 bytes
 
注意:在rman下即使没有参数文件,默认也会启动一个DUMMY实例,以便能够恢复参数文件。
 
4  恢复spfile文件
 
 
 
RMAN> restore spfile to '/oracle/app/db1/dbs/spfileCRM.ora' from '/oracle/app/db1/dbs/0dnsd96i_1_1';
 
 
 
Starting restore at 10-DEC-12
 
using target database control file instead of recovery catalog
 
allocated channel: ORA_DISK_1
 
channel ORA_DISK_1: sid=34 devtype=DISK
 
 
 
channel ORA_DISK_1: autobackup found: /oracle/app/db1/dbs/0dnsd96i_1_1
 
channel ORA_DISK_1: SPFILE restore from autobackup complete
 
Finished restore at 10-DEC-12
 
 
 
5 startup force nomount
 
 
 
RMAN> startup force nomount;
 
 
 
Oracle instance started
 
 
 
Total System Global Area    322961408 bytes
 
 
 
Fixed Size                    2020480 bytes
 
Variable Size                96471936 bytes
 
Database Buffers            218103808 bytes
 
Redo Buffers                  6365184 bytes
 
 
 
6 恢复控制文件
 
 
 
RMAN> restore controlfile to '/oracle/CRM2/CRM/control01.ctl' from '/oracle/app/db1/dbs/0dnsd96i_1_1';
 
 
 
Starting restore at 10-DEC-12
 
allocated channel: ORA_DISK_1
 
channel ORA_DISK_1: sid=210 devtype=DISK
 
 
 
channel ORA_DISK_1: restoring control file
 
channel ORA_DISK_1: restore complete, elapsed time: 00:00:04
 
Finished restore at 10-DEC-12
 
 
 
 
 
cp /oracle/CRM2/CRM/control01.ctl /oracle/CRM2/CRM/control02.ctl

 
 
7 启动数据库到加载状态
 
RMAN> alter database mount;
 
 
 
database mounted
 
released channel: ORA_DISK_1

linux
本文评论   查看全部评论 (0)
表情: 表情 姓名: 字数

       

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