How to Resolve NID-00120: Database should be mounted exclusively

  • by

NID-00120

I was trying to change database name (DB_NAME) of a 19c RAC database by DBNEWID utility (nid), but it failed with NID-00120: Database should be mounted exclusively.

In this case, I startup the database with a PFILE to mount.

SQL> startup pfile='?/dbs/init@.ora' mount;
ORACLE instance started.
...
Database mounted.

Then I use nid to change the database name.

[oracle@primary01 ~]$ nid target=sys/password dbname=TESTCDB
...
Connected to database ORCLCDB (DBID=2828653629)

NID-00120: Database should be mounted exclusively


Change of database name failed during validation - database is intact.
DBNEWID - Completed with validation errors.

Solution

The error specifically complained about not getting exclusivity of the database. We'd better to make this instance get the exclusive right to use the cluster database. So we take the following steps to solve it.

1. Shutdown the instance

SQL> shutdown immediate;
ORA-01109: database not open


Database dismounted.
ORACLE instance shut down.

2. Modify Parameter

We should set the parameter CLUSTER_DATABASE to FALSE by modifying the parameter file.

[oracle@primary01 ~]$ vi $ORACLE_HOME/dbs/init$ORACLE_SID.ora
...
#*.cluster_database=true

By commenting out the parameter, CLUSTER_DATABASE goes back to the default value FALSE.

3. Startup Mount

We start the instance to mount again.

SQL> startup pfile='?/dbs/init@.ora' mount;
ORACLE instance started.
...
Database mounted.

4. Change Database Name

Now we can safely change the database name again.

[oracle@primary01 ~]$ nid target=sys/password dbname=TESTCDB

There's a successful case of changing DB_NAME on a 19c RAC database.

Leave a Reply

Your email address will not be published. Required fields are marked *