Change the Dbid for the Oracle Database:
==========================================================
Steps To Be Followed:
=====================
Please check the Parameter
Make this Cluster_Node = False if it is TRUE and Cluster Instance = 1 if it is 2.
1. SQL> select DBID,name from v$database;
DBID NAME
-------- ----
14211234 DBA
2. SQL> shutdown immediate;
Database closed.
Database dismounted.
ORACLE instance shut down.
3. SQL> startup mount pfile=/DBA10gR2/app/oracle/dbs/initDBA.ora
ORACLE instance started.
Total System Global Area 1073741824 bytes
Fixed Size 1265844 bytes
Variable Size 360714060 bytes
Database Buffers 700448768 bytes
Redo Buffers 11313152 bytes
Database mounted.
4. From the Command Prompt Give the Following :
[oracle@oradbdba dbs]$ nid target=sys/Passwd
DBNEWID: Release 10.2.0.3.0 - Production on Fri Feb 13 07:36:32 2009
Copyright (c) 1982, 2005, Oracle. All rights reserved.
Connected to database DBA (DBID=14213988)
Connected to server version 10.2.0
Control Files in database:
/DBAData/datafiles/controlfile/cntrl01.dbf
/DBAData/onlinelogs/controlfile/cntrl02.dbf
/DBAData/archivelogs/controlfile/cntrl03.dbf
Change database ID of database DBA? (Y/[N]) => Y
Proceeding with operation
Changing database ID from 14213988 to 1137975361
Control File /DBAData/datafiles/controlfile/cntrl01.dbf - modified
Control File /DBAData/onlinelogs/controlfile/cntrl02.dbf - modified
Control File /DBAData/archivelogs/controlfile/cntrl03.dbf - modified
Datafile /DBAData/datafiles/system01.dbf - dbid changed
Datafile /DBAData/datafiles/system02.dbf - dbid changed
Database ID for database DBA changed to 1137975361.
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.
Note : Now the database will be shutdown automatically. So now we want to starup mount and open with reset logs;
5. SQL> startup mount pfile=/DBA10gR2/app/oracle/dbs/initDBA.ora
ORACLE instance started.
Total System Global Area 1073741824 bytes
Fixed Size 1265844 bytes
Variable Size 360714060 bytes
Database Buffers 700448768 bytes
Redo Buffers 11313152 bytes
Database mounted.
6. SQL> alter database open resetlogs;
Database altered.
7. SQL> select dbid,name from v$database;
DBID NAME
---------- ------
11379734937 DBA
No comments:
Post a Comment