Using the Tricky NID Utility

Never did like the Metalink (My Oracle Support) document that described how to use NID.  This is a very powerful utility and can be hard for someone who hasn’t attempted to use it before.

I personally like to keep the ORACLE_SID uppercase…on both UNIX and Windows, it seems to make it more distinct and noticeable above all other TEXT.  So in this case I would change test1by to TEST1BY, see what I mean?

It doesn’t seem to get as lost among other mixed case words in a command.

Subject: How to Change the DBID and the DBNAME by using NID   Doc ID: 224266.1

Most of the instructions are correct and spot on…there is a critical point that they assume that you are running on Windows….It is after Step 4 of the second example of changing both the database ID and database name. Located near the bottom of the page.

4. Shutdown immediate of the database

***********At this point..if you are on Unix, logout completely of your session.  Log back in and execute oraenv for the new DBNAME. In this example it is the ORACLE_SID test1by

***********Now continue on with the instructions…

5. Modfiy the file init.ora of the database

change the parameter BD_NAME=TEST1 TO DBNAME=TEST1BY


6. create a new password file

Usage: orapwd file=<fname> password=<password> entries=<users>


file – name of password file (mand),

password – password for SYS (mand),

entries – maximum number of distinct DBA and OPERs (opt),


7. mount the database

SQL> startup mount pfile=d:\oracle\admin\test1by\pfile\inittest1by.ora

ORACLE instance started.

Total System Global Area 135338868 bytes

Fixed Size 453492 bytes

Variable Size 109051904 bytes

Database Buffers 25165824 bytes

Redo Buffers 667648 bytes

Database mounted.

************************If you are using an spfile…here is where this gets changed.

************************ALTER SYSTEM SET DB_NAME=test1by SCOPE=spfile;

8. Open the databse with RESETLOGS

SQL> alter database open resetlogs;

Database altered.

9. check the dictionary view for the new DBID and DBNAME

select dbid, name, open_mode, activation#, created from v$database;

3 Responses to Using the Tricky NID Utility

  1. chen says:

    ALTER SYSTEM SET DB_NAME should be in nomount mode.

    • April C Sims says:

      No..anytime you are altering the controlfile, the database would have to be in MOUNT mode. This is clearly outlined in the following article.

      How to Change the DBID, DBNAME Using NID Utility in version 10gR2 onwards [ID 863800.1]

Leave a Reply

Fill in your details below or click an icon to log in: Logo

You are commenting using your account. Log Out / Change )

Twitter picture

You are commenting using your Twitter account. Log Out / Change )

Facebook photo

You are commenting using your Facebook account. Log Out / Change )

Google+ photo

You are commenting using your Google+ account. Log Out / Change )

Connecting to %s