数据库做了不完全恢复或以resetlogs方式打开数据库后,在RMAN里需要reset database。否则RMAN里的很多命令会报错:
C:\Documents and Settings\is_sjh>rman catalog rman/rman@recdb target sys/sys@sjhtest
恢复管理器: 版本9.2.0.1.0 - Production
Copyright (c) 1995, 2002, Oracle Corporation. All rights reserved.
连接到目标数据库: SJHTEST (DBID=1488455913)
连接到恢复目录数据库
RMAN> list backup
2> ;
RMAN-00571: ===========================================================
RMAN-00569: =============== ERROR MESSAGE STACK FOLLOWS ===============
RMAN-00571: ===========================================================
RMAN-03002: failure of list command at 12/23/2008 14:57:44
RMAN-06004: ORACLE error from recovery catalog database: RMAN-20003: target database incarnation not found in recovery catalog
RMAN> resync catalog
2> ;
RMAN-00571: ===========================================================
RMAN-00569: =============== ERROR MESSAGE STACK FOLLOWS ===============
RMAN-00571: ===========================================================
RMAN-03009: failure of resync command on default channel at 12/23/2008 14:59:12
RMAN-20003: target database incarnation not found in recovery catalog
RMAN> register database;
RMAN-00571: ===========================================================
RMAN-00569: =============== ERROR MESSAGE STACK FOLLOWS ===============
RMAN-00571: ===========================================================
RMAN-03009: failure of register command on default channel at 12/23/2008 15:00:01
RMAN-20002: target database already registered in recovery catalog
RMAN> report obsolete;
RMAN-00571: ===========================================================
RMAN-00569: =============== ERROR MESSAGE STACK FOLLOWS ===============
RMAN-00571: ===========================================================
RMAN-03002: failure of report command at 12/23/2008 15:00:31
RMAN-06004: ORACLE error from recovery catalog database: RMAN-20003: target database incarnation not found in recovery catalog
RMAN> show all;
RMAN 配置参数为:
RMAN-00571: ===========================================================
RMAN-00569: =============== ERROR MESSAGE STACK FOLLOWS ===============
RMAN-00571: ===========================================================
RMAN-03002: failure of show command at 12/23/2008 15:02:42
RMAN-06004: ORACLE error from recovery catalog database: RMAN-20003: target database incarnation not found in recovery catalog
RMAN> reset database;
在恢复目录中注册的数据库的新实体化
正在启动全部恢复目录的 resync
完成全部 resync
RMAN> list backup
2> ;
备份集列表
===================
BS 关键字 大小 设备类型占用时间 完成时间
------- ---------- ----------- ------------ ----------
66 49M DISK 00:00:09 18-12月-08
BP 关键字: 67 状态: AVAILABLE 标记:TAG20081218T143146
段名:E:\ORACLE\RMAN_BAKCUP\ARCHIVE_SJHTEST_20081218_2
备份集 66 中的已存档日志列表
Thrd Seq 低 SCN 短时间 下一个 SCN 下一次
---- ------- ---------- ---------- ---------- ---------
1 5 365936 15-5月 -08 2972725 13-11月-08
1 6 2972725 13-11月-08 3011562 14-11月-08
1 7 3011562 14-11月-08 3031914 14-11月-08
1 8 3031914 14-11月-08 3052109 14-11月-08
1 9 3052109 14-11月-08 3072399 14-11月-08
1 10 3072399 14-11月-08 3094308 14-11月-08
1 11 3094308 14-11月-08 3114501 14-11月-08
1 12 3114501 14-11月-08 3134698 14-11月-08
1 13 3134698 14-11月-08 3154894 14-11月-08
1 14 3154894 14-11月-08 3176806 14-11月-08
1 15 3176806 14-11月-08 3196895 14-11月-08
1 16 3196895 14-11月-08 3216987 14-11月-08
1 17 3216987 14-11月-08 3237078 14-11月-08
1 18 3237078 14-11月-08 3257535 14-11月-08
。。。
RMAN> show all;
RMAN 配置参数为:
CONFIGURE RETENTION POLICY TO REDUNDANCY 1; # default
CONFIGURE BACKUP OPTIMIZATION OFF; # default
CONFIGURE DEFAULT DEVICE TYPE TO DISK; # default
CONFIGURE CONTROLFILE AUTOBACKUP OFF; # default
CONFIGURE CONTROLFILE AUTOBACKUP FORMAT FOR DEVICE TYPE DISK TO '%F'; # default
CONFIGURE DEVICE TYPE DISK PARALLELISM 1; # default
CONFIGURE DATAFILE BACKUP COPIES FOR DEVICE TYPE DISK TO 1; # default
CONFIGURE ARCHIVELOG BACKUP COPIES FOR DEVICE TYPE DISK TO 1; # default
CONFIGURE MAXSETSIZE TO UNLIMITED; # default
CONFIGURE SNAPSHOT CONTROLFILE NAME TO 'E:\ORACLE\ORA92\DATABASE\SNCFSJHTEST.ORA'; # default
RMAN>
--转自