rman恢复所有数据,控制,参数文件,下


rman恢复所有数据,控制,参数文件,下
自动恢复spfile文件,自动恢复不了,使用之前备份的文件进行恢复
[oracle@oracle1 ~]$ rman target  /


Recovery Manager: Release 11.2.0.1.0 - Production on Mon Apr 3 01:41:44 2017


Copyright (c) 1982, 2009, Oracle and/or its affiliates.  All rights reserved.


connected to target database: SHPOG1 (not mounted)


RMAN> restore spfile  from  autobackup;
Starting restore at 03-APR-17
using target database control file instead of recovery catalog
allocated channel: ORA_DISK_1
channel ORA_DISK_1: SID=135 device type=DISK
RMAN-00571: ===========================================================
RMAN-00569: =============== ERROR MESSAGE STACK FOLLOWS ===============
RMAN-00571: ===========================================================
RMAN-03002: failure of restore command at 04/03/2017 01:43:45
RMAN-06495: must explicitly specify DBID with SET DBID command


RMAN> exit 
[oracle@oracle1 trace]$ ll
total 161592
-rw-r----- 1 oracle oinstall    111946 Apr  3 01:21 alert_shpog1.log
[oracle@oracle1 trace]$ 
[oracle@oracle1 trace]$ vi shpog1_ora_15444.trc
        Compatibility Vsn = 186646528=0xb200000
        Db ID=799280029=0x2fa40b9d, Db Name='SHPOG1'
        Activation ID=799229341=0x2fa3459d
        Control Seq=1934=0x78e, File size=102400=0x19000
        File Number=5, Blksiz=512, File Type=2 LOG


(1)设置dbid
[oracle@oracle1 trace]$ rman target /


connected to target database: SHPOG1 (not mounted)


RMAN> set dbid=799280029;


executing command: SET DBID
(2)强制启动
RMAN> startup nomount  force;


startup failed: ORA-01078: failure in processing system parameters
LRM-00109: could not open parameter file '/oracle/app/product/11.2/db/dbs/initshpog1.ora'


starting Oracle instance without parameter file for retrieval of spfile
Oracle instance started


Total System Global Area     158662656 bytes
Fixed Size                     2211448 bytes
Variable Size                 92275080 bytes
Database Buffers              58720256 bytes
Redo Buffers                   5455872 bytes
(3)先用自动恢复spfile参数文件,如果恢复不了,再用之前备份的进行恢复
RMAN> restore  spfile from autobackup;


Starting restore at 03-APR-17
using target database control file instead of recovery catalog
allocated channel: ORA_DISK_1
channel ORA_DISK_1: SID=130 device type=DISK
channel ORA_DISK_1: looking for AUTOBACKUP on day: 20170403
channel ORA_DISK_1: looking for AUTOBACKUP on day: 20170402
channel ORA_DISK_1: looking for AUTOBACKUP on day: 20170401
channel ORA_DISK_1: looking for AUTOBACKUP on day: 20170331
channel ORA_DISK_1: looking for AUTOBACKUP on day: 20170330
channel ORA_DISK_1: looking for AUTOBACKUP on day: 20170329
channel ORA_DISK_1: looking for AUTOBACKUP on day: 20170328
channel ORA_DISK_1: no AUTOBACKUP in 7 days found
RMAN-00571: ===========================================================
RMAN-00569: =============== ERROR MESSAGE STACK FOLLOWS ===============
RMAN-00571: ===========================================================
RMAN-03002: failure of restore command at 04/03/2017 01:53:16
RMAN-06172: no AUTOBACKUP found or specified handle is not a valid copy or piece
(4)用之前备份的进行恢复
RMAN> restore  spfile  from  '/oracle.bacup/control/cf_c-799280029-20170403-02';



Starting restore at 03-APR-17
using channel ORA_DISK_1


channel ORA_DISK_1: restoring spfile from AUTOBACKUP /oracle.bacup/control/cf_c-799280029-20170403-02
channel ORA_DISK_1: SPFILE restore from AUTOBACKUP complete
Finished restore at 03-APR-17

RMAN> exit 
(5)spfile文件已经恢复
[oracle@oracle1 dbs]$ ll
total 2271764
-rw-r----- 1 oracle oinstall 1153318912 Mar 18 04:11 01rvdlk4_1_1
-rw-r----- 1 oracle oinstall 1153351680 Mar 18 04:14 02rvdlum_1_1
-rw-r----- 1 oracle oinstall    9830400 Mar 18 04:14 03rvdm22_1_1
drwxr-xr-x 2 oracle oinstall       4096 Apr  2 23:12 arch
-rw-rw---- 1 oracle oinstall       1544 Mar 18 03:01 hc_DBUA0.dat
-rw-rw---- 1 oracle oinstall       1544 Apr  3 01:52 hc_shpog1.dat
-rw-r--r-- 1 oracle oinstall       2851 May 15  2009 init.ora
-rw-r----- 1 oracle oinstall         24 Mar 18 03:11 lkSHPOG1
-rw-r----- 1 oracle oinstall       1536 Mar 18 03:19 orapwshpog1
-rw-r----- 1 oracle oinstall    9748480 Apr  3 00:34 snapcf_shpog1.f
-rw-r----- 1 oracle oinstall       2560 Apr  3 01:56 spfileshpog1.ora
(6)关闭数据库,再开启报错少控制文件
[oracle@oracle1 dbs]$ sqlplus  / as sysdba
SQL> shutdown immediate;
ORA-01507: database not mounted


ORACLE instance shut down.
SQL> startup;  
ORACLE instance started.
Total System Global Area 1586708480 bytes
Fixed Size                  2213736 bytes
Variable Size            1191184536 bytes
Database Buffers          385875968 bytes
Redo Buffers                7434240 bytes
ORA-00205: error in identifying control file, check alert log for more info


SQL> exsit 
SP2-0042: unknown command "exsit" - rest of line ignored.
SQL> exit 
(7)恢复控制文件,先自动恢复,如果没恢复,再用之前备份的进行恢复
RMAN> restore  controlfile  from autobackup;



Starting restore at 03-APR-17
using target database control file instead of recovery catalog
allocated channel: ORA_DISK_1
channel ORA_DISK_1: SID=572 device type=DISK
RMAN-00571: ==
  • 1
    点赞
  • 1
    收藏
    觉得还不错? 一键收藏
  • 0
    评论

“相关推荐”对你有帮助么?

  • 非常没帮助
  • 没帮助
  • 一般
  • 有帮助
  • 非常有帮助
提交
评论
添加红包

请填写红包祝福语或标题

红包个数最小为10个

红包金额最低5元

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

抵扣说明:

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

余额充值