nid 對RMAN備份的影響--- 控制檔案中備份記錄全部丟失

itpremier發表於2010-06-29

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/,如需轉載,請註明出處,否則將追究法律責任。

相關文章