oracle使用catalog手动注册日志进行前滚

1.手动注册归档日志

RMAN> catalog start with '/archivelog/';


searching for all files that match the pattern /archivelog/


List of Files Unknown to the Database
=====================================
File Name: /archivelog/1_11_864163925.dbf
File Name: /archivelog/1_8_864163925.dbf
File Name: /archivelog/1_7_864163925.dbf
File Name: /archivelog/1_10_864163925.dbf
File Name: /archivelog/1_12_864163925.dbf
File Name: /archivelog/1_9_864163925.dbf


Do you really want to catalog the above files (enter YES or NO)? y
cataloging files...
cataloging done


List of Cataloged Files
=======================
File Name: /archivelog/1_11_864163925.dbf
File Name: /archivelog/1_8_864163925.dbf
File Name: /archivelog/1_7_864163925.dbf
File Name: /archivelog/1_10_864163925.dbf
File Name: /archivelog/1_12_864163925.dbf
File Name: /archivelog/1_9_864163925.dbf


RMAN> 



2.使用recover database using backup controlfile;进行恢复


[oracle@lucky oradata]$ sqlplus / as sysdba



SQL*Plus: Release 11.2.0.1.0 Production on Thu Nov 20 21:47:32 2014


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




Connected to:
Oracle Database 11g Enterprise Edition Release 11.2.0.1.0 - 64bit Production
With the Partitioning, OLAP, Data Mining and Real Application Testing options


SQL> recover database using backup controlfile;
ORA-00279: change 62976135 generated at 11/20/2014 21:40:13 needed for thread 1
ORA-00289: suggestion : /archivelog/1_7_864163925.dbf
ORA-00280: change 62976135 for thread 1 is in sequence #7




Specify log: {<RET>=suggested | filename | AUTO | CANCEL}
auto
ORA-00279: change 62976332 generated at 11/20/2014 21:45:15 needed for thread 1
ORA-00289: suggestion : /archivelog/1_8_864163925.dbf
ORA-00280: change 62976332 for thread 1 is in sequence #8
ORA-00278: log file '/archivelog/1_7_864163925.dbf' no longer needed for this
recovery




ORA-00279: change 62976335 generated at 11/20/2014 21:45:16 needed for thread 1
ORA-00289: suggestion : /archivelog/1_9_864163925.dbf
ORA-00280: change 62976335 for thread 1 is in sequence #9
ORA-00278: log file '/archivelog/1_8_864163925.dbf' no longer needed for this
recovery




ORA-00279: change 62976362 generated at 11/20/2014 21:45:33 needed for thread 1
ORA-00289: suggestion : /archivelog/1_10_864163925.dbf
ORA-00280: change 62976362 for thread 1 is in sequence #10
ORA-00278: log file '/archivelog/1_9_864163925.dbf' no longer needed for this
recovery




ORA-00279: change 62976365 generated at 11/20/2014 21:45:36 needed for thread 1
ORA-00289: suggestion : /archivelog/1_11_864163925.dbf
ORA-00280: change 62976365 for thread 1 is in sequence #11
ORA-00278: log file '/archivelog/1_10_864163925.dbf' no longer needed for this
recovery




ORA-00279: change 62976368 generated at 11/20/2014 21:45:36 needed for thread 1
ORA-00289: suggestion : /archivelog/1_12_864163925.dbf
ORA-00280: change 62976368 for thread 1 is in sequence #12
ORA-00278: log file '/archivelog/1_11_864163925.dbf' no longer needed for this
recovery




ORA-00279: change 62976371 generated at 11/20/2014 21:45:37 needed for thread 1
ORA-00289: suggestion : /archivelog/1_13_864163925.dbf
ORA-00280: change 62976371 for thread 1 is in sequence #13
ORA-00278: log file '/archivelog/1_12_864163925.dbf' no longer needed for this
recovery




ORA-00308: cannot open archived log '/archivelog/1_13_864163925.dbf'
ORA-27037: unable to obtain file status
Linux-x86_64 Error: 2: No such file or directory
Additional information: 3




SQL> alter database open resetlogs;
alter database open resetlogs
*
ERROR at line 1:
ORA-01113: file 1 needs media recovery

ORA-01110: data file 1: '/u01/app/oracle/oradata/orcl/system.dbf'


3.另开窗口使用rman进行recover database


[oracle@lucky orcl]$ rman target /


Recovery Manager: Release 11.2.0.1.0 - Production on Thu Nov 20 21:49:25 2014


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


connected to target database: ORCL (DBID=1388930774, not open)


RMAN> recover database;


Starting recover at 20-NOV-14
using target database control file instead of recovery catalog
allocated channel: ORA_DISK_1
channel ORA_DISK_1: SID=6 device type=DISK


starting media recovery


unable to find archived log
archived log thread=1 sequence=13
RMAN-00571: ===========================================================
RMAN-00569: =============== ERROR MESSAGE STACK FOLLOWS ===============
RMAN-00571: ===========================================================
RMAN-03002: failure of recover command at 11/20/2014 21:49:33
RMAN-06054: media recovery requesting unknown archived log for thread 1 with sequence 13 and starting SCN of 62976371


RMAN> 


#####以上为另开的窗口



4.再open数据库


SQL> alter database open resetlogs;


Database altered.
评论
添加红包

请填写红包祝福语或标题

红包个数最小为10个

红包金额最低5元

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

抵扣说明:

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

余额充值