Today I was trying to change DBID ad DBNAME of my RAC database ad got below error :-
==>nid target=/ DBNAME=RASTAND
DBNEWID: Release 11.2.0.4.0 - Production on Wed Mar 18 12:18:32 2015
Copyright (c) 1982, 2011, Oracle and/or its affiliates. All rights reserved.
Connected to database AMIT(DBID=2971225332)
NID-00120: Database should be mounted exclusively
Change of database name failed during validation - database is intact.
DBNEWID - Completed with validation errors.
==>nid target=/ DBNAME=RASTAND
DBNEWID: Release 11.2.0.4.0 - Production on Wed Mar 18 12:18:32 2015
Copyright (c) 1982, 2011, Oracle and/or its affiliates. All rights reserved.
Connected to database AMIT(DBID=2971225332)
NID-00120: Database should be mounted exclusively
Change of database name failed during validation - database is intact.
DBNEWID - Completed with validation errors.
Solution :-
To change DBId and Database Name of a RAC database , we need to set cluster_database parameter to false and Database should be mounted in One node.
SQL> alter system set cluster_database=FALSE scope=spfile sid='*';
System altered.
SQL> shu immediate
ORA-01109: database not open
Database dismounted.
ORACLE instance shut down.
SQL> startup mount
ORACLE instance started.
Total System Global Area 1060585472 bytes
Fixed Size 2260000 bytes
Variable Size 817890272 bytes
Database Buffers 230686720 bytes
Redo Buffers 9748480 bytes
Database mounted.
SQL> exit
Disconnected from Oracle Database 11g Enterprise Edition Release 11.2.0.4.0 - 64bit Production
With the Partitioning, Real Application Clusters, Automatic Storage Management, Oracle Label Security,
OLAP, Data Mining and Real Application Testing options
[server][oracle][RASTAND1]
/usr/local/oracle$
==>nid target=/ DBNAME=RASTAND
DBNEWID: Release 11.2.0.4.0 - Production on Wed Mar 18 12:28:23 2015
Copyright (c) 1982, 2011, Oracle and/or its affiliates. All rights reserved.
Connected to database AMIT (DBID=2971225332)
Connected to server version 11.2.0
Control Files in database:
+DATA_0220/rastand/controlfile/control01.ctl
+FRA_0220/rastand/controlfile/control02.ctl
Change database ID and database name AMIT to RASTAND? (Y/[N]) => Y
Proceeding with operation
Changing database ID from 2971225332 to 3013823719
Changing database name from AMIT to RASTAND
Control File +DATA_0220/rastand/controlfile/control01.ctl - modified
Control File +FRA_0220/rastand/controlfile/control02.ctl - modified
Datafile +DATA_0220/rastand/system01.db - dbid changed, wrote new name
Datafile +DATA_0220/rastand/sysaux01.db - dbid changed, wrote new name
Datafile +DATA_0220/rastand/undotbs1.db - dbid changed, wrote new name
Datafile +DATA_0220/rastand/undotbs2.db - dbid changed, wrote new name
Datafile +DATA_0220/rastand/users_1.db - dbid changed, wrote new name
Datafile +DATA_0220/rastand/ts_aud01.db - dbid changed, wrote new name
Datafile +DATA_0220/rastand/data01.db - dbid changed, wrote new name
Datafile +DATA_0220/rastand/idx01.db - dbid changed, wrote new name
Datafile +DATA_0220/rastand/arch01.db - dbid changed, wrote new name
Datafile +DATA_0220/rastand/test_01.db - dbid changed, wrote new name
Datafile +DATA_0220/rastand/amit_01.db - dbid changed, wrote new name
Datafile +DATA_0220/rastand/amit_02.db - dbid changed, wrote new name
Datafile +DATA_0220/rastand/amit_03.db - dbid changed, wrote new name
Datafile +DATA_0220/rastand/temp01.db - dbid changed, wrote new name
Control File +DATA_0220/rastand/controlfile/control01.ctl - dbid changed, wrote new name
Control File +FRA_0220/rastand/controlfile/control02.ctl - dbid changed, wrote new name
Instance shut down
Database name changed to RASTAND.
Modify parameter file and generate a new password file before restarting.
Database ID for database RASTAND changed to 3013823719.
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 name and ID.
DBNEWID - Completed succesfully.
DBID chaged successfully in RAC database
I hope this article helped you.
Regards,
Amit Rath
No comments:
Post a Comment