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
----有时候,在恢复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/