reset database的用处

某数据库使用open resetlogs开启后,rman命令总是失败并报告如下信息

RMAN-00571: ===========================================================

RMAN-00569: =============== ERROR MESSAGE STACK FOLLOWS ===============

RMAN-00571: ===========================================================

RMAN-03009: failure of resync command on default channel at 12/28/2012 03:43:21

RMAN-20003: target database incarnation not found in recovery catalog

这是由于catalog没有加载最新的incarnation信息所致

一般说来,当数据库resetlogs开启后,需要在rman命令行中调用命令reset database以通知其新的incarnation已经产生了;

另外,如果数据库想恢复到resetlogs之前的某个状态,也需要先调用此命令;

Syntax Element

Description

TO INCARNATION primary_key

Changes the current incarnation to an older incarnation. Specify the primary key of the DBINC record for the database incarnation. Run LIST INCARNATION OF DATABASE to obtain possible key values. After you issue RESET DATABASE TO INCARNATION, then you can run RMAN commands such as RESTORE and RECOVER.

 

采用nocatalog登陆查看rman 中数据库incarnation信息

db@localhost> $ORACLE_HOME/bin/rman target /

 

Recovery Manager: Release 9.2.0.8.0 - 64bit Production

 

Copyright (c) 1995, 2002, Oracle Corporation.  All rights reserved.

 

connected to target database: DB (DBID=579131802)

 

RMAN> list incarnation of database db;

 

using target database controlfile instead of recovery catalog

 

List of Database Incarnations

DB Key  Inc Key DB Name  DB ID            CUR Reset SCN  Reset Time

------- ------- -------- ---------------- --- ---------- ----------

1       1       DB      579131802        NO  1          12-FEB-05

2       2       DB      579131802        NO  8809796368498 09-JUL-11

3       3       DB      579131802        YES 9049127486070 23-DEC-12

 

RMAN> reset database;

 

RMAN-00571: ===========================================================

RMAN-00569: =============== ERROR MESSAGE STACK FOLLOWS ===============

RMAN-00571: ===========================================================

RMAN-03002: failure of reset command at 12/28/2012 04:03:34

RMAN-06002: command not allowed when not connected to a recovery catalog

 

采用catalog登陆

RMAN> connect catalog rman_sys/*****@rman;

 

connected to recovery catalog database

 

RMAN> list incarnation of database db;

 

 

List of Database Incarnations

DB Key  Inc Key DB Name  DB ID            CUR Reset SCN  Reset Time

------- ------- -------- ---------------- --- ---------- ----------

423298  423299  DB      579131802        NO  1          12-FEB-05

423298  52409251 DB      579131802        YES 8809796368498 09-JUL-11

--当前incarnation不是最新的,调用reset database注册最新的incarnation

RMAN>  reset database;

 

new incarnation of database registered in recovery catalog

starting full resync of recovery catalog

full resync complete

 

RMAN> resync catalog;

 

starting full resync of recovery catalog

full resync complete

 

更多信息查看

http://space.itpub.net/15480802/viewspace-697309

http://space.itpub.net/15480802/viewspace-718437

http://docs.oracle.com/cd/B19306_01/backup.102/b14194/rcmsynta050.htm

 

来自 “ ITPUB博客 ” ,链接:http://blog.itpub.net/15480802/viewspace-751803/,如需转载,请注明出处,否则将追究法律责任。

转载于:http://blog.itpub.net/15480802/viewspace-751803/

  • 0
    点赞
  • 0
    收藏
    觉得还不错? 一键收藏
  • 0
    评论
评论
添加红包

请填写红包祝福语或标题

红包个数最小为10个

红包金额最低5元

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

抵扣说明:

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

余额充值