Oracle Database DBID Değiştirme
Oracle veritabanının DBID sini değiştirmek zorunda kaldığımızda alttaki adımları uygulamak yeterli olacaktır.
SQL> startup mount
ORACLE instance started.
Total System Global Area 481267712 bytes
Fixed Size 1300716 bytes
Variable Size 226494228 bytes
Database Buffers 247463936 bytes
Redo Buffers 6008832 bytes
Database mounted.
SQL> exit
Disconnected from Oracle Database 11g Enterprise Edition Release 11.1.0.6.0 – Production
With the Partitioning, Real Application Clusters, OLAP, Data Mining
and Real Application Testing options
[oracle@rac1 ~]$ . oraenv
ORACLE_SID = [demo2] ?
The Oracle base for ORACLE_HOME=/u01/app/oracle/product/11.1.0/db_1 is /u01/app/oracle
[oracle@rac1 ~]$ nid target = /
DBNEWID: Release 11.1.0.6.0 – Production on Thu Dec 24 20:05:44 2009
Copyright (c) 1982, 2007, Oracle. All rights reserved.
Connected to database DEMO2 (DBID=3682169720)
Connected to server version 11.1.0
Control Files in database:
/u01/app/oracle/oradata/demo2/control01.ctl
/u01/app/oracle/oradata/demo2/control02.ctl
/u01/app/oracle/oradata/demo2/control03.ctl
Change database ID of database DEMO2? (Y/[N]) => y
Proceeding with operation
Changing database ID from 3682169720 to 3682222232
Control File /u01/app/oracle/oradata/demo2/control01.ctl – modified
Control File /u01/app/oracle/oradata/demo2/control02.ctl – modified
Control File /u01/app/oracle/oradata/demo2/control03.ctl – modified
Datafile /u01/app/oracle/oradata/demo2/system01.dbf – dbid changed
Datafile /u01/app/oracle/oradata/demo2/sysaux01.dbf – dbid changed
Datafile /u01/app/oracle/oradata/demo2/undotbs01.dbf – dbid changed
Datafile /u01/app/oracle/oradata/demo2/users01.dbf – dbid changed
Datafile /u01/app/oracle/oradata/demo2/temp01.dbf – dbid changed
Control File /u01/app/oracle/oradata/demo2/control01.ctl – dbid changed
Control File /u01/app/oracle/oradata/demo2/control02.ctl – dbid changed
Control File /u01/app/oracle/oradata/demo2/control03.ctl – dbid changed
Instance shut down
Database ID for database DEMO2 changed to 3682222232.
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.
SQL> alter database open resetlogs;
Database altered.
SQL> select dbid from v$database;
DBID