- Posted by Arjun Raja
- On July 14, 2009
- 0 Comments
After a clone of a database to another machine with the same database name or if a new database name is created by recreating the controlfile, there is a need to recreate the dbid especially if the new database is to be registered in the same RMAN catalog.
This ensures especially if an RMAN catalog is used that the database can be registered in the catalog since only one dbid is allowed to be registered in a catalog – hence 2 databases with the same dbid on different machines, still can’t be registered in the same catalog.
To change dbid follow these steps –
Make sure the sys password is correct –
sqlplus “sys/password@test as sysdba” – should connect without errors.
Then command line :
DBNEWID: Release 188.8.131.52.0 – 64bit Production
Copyright (c) 1995, 2002, Oracle Corporation. All rights reserved.
Connected to database TEST (DBID=2764499561)
Control Files in database:
Change database ID of database TEST? (Y/[N]) => Y
Proceeding with operation
Changing database ID from 2764499561 to 3112540754
Control File /u01/oradata/test/control01.ctl – modified
Control File /u02/oradata/test/control02.ctl – modified
Datafile /u02/oradata/test/system01.dbf – dbid changed
Datafile /u02/oradata/test/users01.dbf – dbid changed
Datafile /u02/oradata/test/patrol01.dbf – dbid changed
Datafile /u02/oradata/test/temp01.dbf – dbid changed
Datafile /u02/oradata/test/temp02.dbf – dbid changed
Control File /u01/oradata/test/control01.ctl – dbid changed
Control File /u02/oradata/test/control02.ctl – dbid changed
Database ID for database TEST changed to 3112540754.
All previous backups and archived redo logs for this database are unusable.
Shut down database and open with RESETLOGS option.
Succesfully changed database ID.
DBNEWID – Completed succesfully.
alter database open resetlogs;
To check new dbid-
oracle(DATABASE)@tmpu020:rman target /
connected to target database: TEST (DBID=3112540754)