nid 对RMAN备份的影响--- 控制文件中备份记录全部丢失

本文详细介绍了在更改数据库ID后,如何正确地使用RMAN进行恢复,并注意控制文件中备份记录的变化。通过实例展示了从旧ID到新ID的转换过程及后续操作。

摘要生成于 C知道 ,由 DeepSeek-R1 满血版支持, 前往体验 >

NID 操作要求:

1, DB是MOUNT状态:

d:oradata>nid target=/

DBNEWID: Release 10.2.0.1.0 - Production on Tue Jun 29 09:56:31 2010

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

Connected to database ZR (DBID=3106537735)

NID-00121: Database should not be open

2, 操作完后使用RESETLOGS打开DB

SQL> startup
ORACLE instance started.

Total System Global Area 603979776 bytes
Fixed Size 1250380 bytes
Variable Size 180358068 bytes
Database Buffers 415236096 bytes
Redo Buffers 7135232 bytes
Database mounted.
ORA-01589: must use RESETLOGS or NORESETLOGS option for database open

[@more@]

----有时候,在恢复DB后需要更改DBID。这时需注意控制文件中的备份记录会被清除掉。

d:oradata>nid target=/

DBNEWID: Release 10.2.0.1.0 - Production on Tue Jun 29 10:00:57 2010

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

Connected to database ZR (DBID=3106537735)

Connected to server version 10.2.0

Control Files in database:
D:ORADATAZRCONTROL01.CTL
D:ORADATAZRCONTROL02.CTL

Change database ID of database ZR? (Y/[N]) => y

Proceeding with operation
Changing database ID from 3106537735 to 3106649561
Control File D:ORADATAZRCONTROL01.CTL - modified
Control File D:ORADATAZRCONTROL02.CTL - modified
Datafile D:ORADATAZRSYSTEM01.DBF - dbid changed
Datafile D:ORADATAZRUNDOTBS01.DBF - dbid changed
Datafile D:ORADATAZRSYSAUX01.DBF - dbid changed
Datafile D:ORADATAZRUSERS01.DBF - dbid changed
Datafile D:ORADATAZREXAMPLE01.DBF - dbid changed
Datafile E:ZR01.DBF - dbid changed
Datafile D:ORADATAZRTEMP01.DBF - dbid changed
Control File D:ORADATAZRCONTROL01.CTL - dbid changed
Control File D:ORADATAZRCONTROL02.CTL - dbid changed
Instance shut down

Database ID for database ZR changed to 3106649561.
All previous backups and archived redo logs for this database are unusable.
Database is not aware of previous backups and archived logs in Recovery Area.
Database has been shutdown, open database with RESETLOGS option.
Succesfully changed database ID.
DBNEWID - Completed succesfully.

----

d:oradata>rman target /

Recovery Manager: Release 10.2.0.1.0 - Production on Tue Jun 29 10:05:02 2010

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

connected to target database: ZR (DBID=3106649561)

RMAN> list backup ;

using target database control file instead of recovery catalog

RMAN>

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

转载于:http://blog.itpub.net/350519/viewspace-1034735/

评论
添加红包

请填写红包祝福语或标题

红包个数最小为10个

红包金额最低5元

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

抵扣说明:

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

余额充值