a. shutdown immediate;
b. change the initSID.ora (Cluster_database = FALSE)
c. startup pfile=$ORACLE_HOME/dbs/initSID.ora mount;
d. nid target=sys/password
Old ID TEST1:
SQL> select DBID,name from v$database;
DBID NAME
---------- ---------
13455769 TEST
Old ID TEST2:
SQL> select DBID,name from v$database;
DBID NAME
---------- ---------
13455769 TEST
Database ID for database TEST changed to 1969630541.
All previous backups and archived redo logs for this database are unusable.
Database has been shutdown, open database with RESETLOGS option.
Succesfully changed database ID.
DBNEWID - Completed succesfully.
SQL> startup mount pfile=/TEST/oracle/10.2.0/dbs/initTEST1.ora
[oracle@oratest1 dbs]$ nid target=sys/password
DBNEWID: Release 10.1.0.4.0 - Production
Copyright (c) 2001, 2004, Oracle. All rights reserved.
Connected to database TEST (DBID=13455769)
Connected to server version 10.1.0
Control Files in database:
/u01/oradata/controlfiles/cntrl01.ctl
/u01/oradata/controlfiles/cntrl02.ctl
/u01/oradata/controlfiles/cntrl03.ctl
Change database ID of database TEST? (Y/[N]) => Y
Proceeding with operation
Changing database ID from 14213988 to 1969630541
Control File /u01/oradata/controlfiles/cntrl01.ctl - modified
Control File /u01/oradata/controlfiles/cntrl02.ctl - modified
Control File /u01/oradata/controlfiles/cntrl03.ctl - modified
Datafile /u01/oradata/system01.dbf - dbid changed
Datafile /u01/oradata/system02.dbf - dbid changed
Datafile /u01/oradata/system03.dbf - dbid changed
Datafile /u01/oradata/system04.dbf - dbid changed
Datafile /u01/oradata/system05.dbf - dbid changed
.
.
.
.
.
.
Datafile /u01/oradata/apps_ts_tx_idx04.dbf - dbid changed
Datafile /u01/oradata/apps_ts_seed02.dbf - dbid changed
Datafile /u01/oradata/temp01.dbf - dbid changed
Control File /u01/oradata/controlfiles/cntrl01.ctl - dbid changed
Control File /u01/oradata/controlfiles/cntrl02.ctl - dbid changed
Control File /u01/oradata/controlfiles/cntrl03.ctl - dbid changed
Instance shut down
Database ID for database TEST changed to 1969630541.
All previous backups and archived redo logs for this database are unusable.
Database has been shutdown, open database with RESETLOGS option.
Succesfully changed database ID.
DBNEWID - Completed succesfully.
[oracle@oratest1 dbs]$ sqlplus "/as sysdba"
SQL*Plus: Release 10.1.0.4.0 - Production on Sun Nov 23 07:25:47 2008
Copyright (c) 1982, 2005, Oracle. All rights reserved.
Connected to an idle instance.
SQL> startup mount pfile=/TEST/oracle/10.2.0/dbs/initTEST1.ora
ORACLE instance started.
Total System Global Area 1073741824 bytes
Fixed Size 782584 bytes
Variable Size 341053192 bytes
Database Buffers 721420288 bytes
Redo Buffers 10485760 bytes
Database mounted.
SQL> alter database open resetlogs;
Database altered.
SQL> select dbid,name from v$database;
DBID NAME
---------- ---------
1896547098 TEST
No comments:
Post a Comment