Bo's Oracle Station

查看: 1421|回复: 1

验证单实例12C实验在用错控制文件二进制备份后,不连catalog的结果#

[复制链接]

11

主题

27

帖子

377

积分

版主

Rank: 7Rank: 7Rank: 7

积分
377
发表于 2014-7-23 22:38:06 | 显示全部楼层 |阅读模式
本帖最后由 sorry休止符 于 2014-7-23 22:56 编辑

12c_当前控制文件和日志文件全部损坏_备份时只读user表空间不完全恢复_用控制文件二进制备份

RMAN> restore controlfile from tag 'LABS-12C-CONTR-BEFORE-RW';

Starting restore at 23-JUL-14
allocated channel: ORA_DISK_1
channel ORA_DISK_1: SID=26 device type=DISK
.
.省略显示
.

allocated channel: ORA_DISK_8
channel ORA_DISK_8: SID=32 device type=DISK

channel ORA_DISK_1: starting datafile backup set restore
channel ORA_DISK_1: restoring control file
channel ORA_DISK_1: reading from backup piece +FRA/orcl/backupset/2014_07_23/ncnnf0_labs-12c-contr-before-rw_0.286.853710635
channel ORA_DISK_1: piece handle=+FRA/orcl/backupset/2014_07_23/ncnnf0_labs-12c-contr-before-rw_0.286.853710635 tag=LABS-12C-CONTR-BEFORE-RW
channel ORA_DISK_1: restored backup piece 1
channel ORA_DISK_1: restore complete, elapsed time: 00:00:15
output file name=+DATA/orcl/controlfile/current.263.853710867
output file name=+FRA/orcl/controlfile/current.259.853710877
Finished restore at 23-JUL-14

RMAN> exit

[oracle@station67 ~]$ sqlplus / as sysdba

SQL> alter database mount;

Database altered.

SQL> recover database until cancel using backup controlfile;
ORA-00279: change 1004837 generated at 07/23/2014 21:47:00 needed for thread 1
ORA-00289: suggestion :
+FRA/orcl/archivelog/2014_07_23/thread_1_seq_24.292.853710701
ORA-00280: change 1004837 for thread 1 is in sequence #24


Specify log: {<RET>=suggested | filename | AUTO | CANCEL}
auto
ORA-00279: change 1005010 generated at 07/23/2014 21:51:41 needed for thread 1
ORA-00289: suggestion :
+FRA/orcl/archivelog/2014_07_23/thread_1_seq_25.293.853710701
ORA-00280: change 1005010 for thread 1 is in sequence #25
ORA-00278: log file
'+FRA/orcl/archivelog/2014_07_23/thread_1_seq_24.292.853710701' no longer
needed for this recovery
.
.省略显示
.

ORA-00279: change 1005041 generated at 07/23/2014 21:51:53 needed for thread 1
ORA-00289: suggestion : +FRA
ORA-00280: change 1005041 for thread 1 is in sequence #29
ORA-00278: log file
'+FRA/orcl/archivelog/2014_07_23/thread_1_seq_28.296.853710713' no longer
needed for this recovery


ORA-00308: cannot open archived log '+FRA'
ORA-17503: ksfdopn:2 Failed to open file +FRA
ORA-15045: ASM file name '+FRA' is not in reference form


ORA-01547: warning: RECOVER succeeded but OPEN RESETLOGS would get error below
ORA-01194: file 1 needs more recovery to be consistent
ORA-01110: data file 1: '+DATA/orcl/datafile/system.256.832197063'


SQL> exit
[oracle@station67 ~]$ sqlplus / as sysdba

SQL> recover database until cancel using backup controlfile;
ORA-00279: change 1005041 generated at 07/23/2014 21:51:53 needed for thread 1
ORA-00289: suggestion : +FRA
ORA-00280: change 1005041 for thread 1 is in sequence #29


Specify log: {<RET>=suggested | filename | AUTO | CANCEL}
cancel
ORA-01547: warning: RECOVER succeeded but OPEN RESETLOGS would get error below
ORA-01194: file 1 needs more recovery to be consistent
ORA-01110: data file 1: '+DATA/orcl/datafile/system.256.832197063'


ORA-01112: media recovery not started


SQL> exit
[oracle@station67 ~]$ rman target /                           

Recovery Manager: Release 11.2.0.1.0 - Production on Wed Jul 23 21:55:57 2014

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

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

RMAN> run {
2> set until sequence 29 thread 1;
3> restore database;
4> recover database;
5> }


executing command: SET until clause

Starting restore at 23-JUL-14
Starting implicit crosscheck backup at 23-JUL-14
using target database control file instead of recovery catalog
allocated channel: ORA_DISK_1
channel ORA_DISK_1: SID=1 device type=DISK
.
.省略显示
.

allocated channel: ORA_DISK_8
channel ORA_DISK_8: SID=21 device type=DISK
Crosschecked 8 objects
Finished implicit crosscheck backup at 23-JUL-14

Starting implicit crosscheck copy at 23-JUL-14
using channel ORA_DISK_1
.
.省略显示
.

using channel ORA_DISK_8
Finished implicit crosscheck copy at 23-JUL-14

searching for all files in the recovery area
cataloging files...
cataloging done

List of Cataloged Files
=======================
File Name: +fra/ORCL/AUTOBACKUP/2014_07_23/s_853710638.287.853710641
.
.省略显示
.

File Name: +fra/ORCL/BACKUPSET/2014_07_23/ncnnf0_LABS-12C-CONTR-AFTER-RW_0.290.853710677

using channel ORA_DISK_1
.
.省略显示
.

using channel ORA_DISK_8

channel ORA_DISK_1: starting datafile backup set restore
.
.省略显示
.

channel ORA_DISK_4: restore complete, elapsed time: 00:07:25
Finished restore at 23-JUL-14

Starting recover at 23-JUL-14
using channel ORA_DISK_1
.
.省略显示
.

using channel ORA_DISK_8

starting media recovery

archived log for thread 1 with sequence 7 is already on disk as file +FRA/orcl/archivelog/2013_11_22/thread_1_seq_7.267.832199113
.
.省略显示
.
archived log for thread 1 with sequence 28 is already on disk as file +FRA/orcl/archivelog/2014_07_23/thread_1_seq_28.296.853710713
.
.省略显示
.

archived log file name=+FRA/orcl/archivelog/2014_07_23/thread_1_seq_28.296.853710713 thread=1 sequence=28
media recovery complete, elapsed time: 00:09:43
Finished recover at 23-JUL-14

RMAN> alter database open resetlogs;

database opened

RMAN> exit


Recovery Manager complete.
[oracle@station67 ~]$ sqlplus / as sysdba

SQL> select name , status from v$datafile;

NAME
--------------------------------------------------------------------------------
STATUS
-------
+DATA/orcl/datafile/system.256.832197063
SYSTEM

+DATA/orcl/datafile/sysaux.257.832197065
ONLINE

+DATA/orcl/datafile/undotbs1.258.832197065
ONLINE


NAME
--------------------------------------------------------------------------------
STATUS
-------
+DATA/orcl/datafile/users.259.832197065
ONLINE

+DATA/orcl/datafile/example.265.832197353
ONLINE


SQL> select tablespace_name,status from dba_tablespaces;

TABLESPACE_NAME                STATUS
------------------------------ ---------
SYSTEM                         ONLINE
SYSAUX                         ONLINE
UNDOTBS1                       ONLINE
TEMP                           ONLINE
USERS                          ONLINE
EXAMPLE                        ONLINE

6 rows selected.
结果见下图:



12c结果

12c结果
回复

使用道具 举报

11

主题

27

帖子

377

积分

版主

Rank: 7Rank: 7Rank: 7

积分
377
 楼主| 发表于 2014-7-23 22:53:20 | 显示全部楼层
唐老师当时在课堂上你做的时候,是连着catalog做的,这里我是取完控制文件二进制备份后不连catalog做,但是好像结果跟连着catalog是一样的结果。
回复 支持 反对

使用道具 举报

您需要登录后才可以回帖 登录 | 立即注册

本版积分规则

QQ|手机版|Bo's Oracle Station   

GMT+8, 2024-11-24 21:17 , Processed in 0.044417 second(s), 28 queries .

快速回复 返回顶部 返回列表