To change the Database name using NID utility

1)Make a whole database backup.

2)Login as a sys user..

sql>conn sys as sysdba

3)Check your database name

sql>SELECT nameFROM v$database;


4)Make a proper shutdown of the database

here you can user immediate or transactional or normal


5) Invoke the newid utility

C:\mohd.dba>nid TARGET=system/manager@orcl DBNAME=newdb SETNAME=Y

DBNEWID: Release – Production on Sat Jan 31 12:45:03 2009

Copyright (c) 1982, 2005, Oracle. All rights reserved.

Connected to database ORCL (DBID=1203749959)

Connected to server version 10.2.0

Control Files in database:

Changing database name from ORCL to NEWDB
Control File G:\ORACLE\PRODUCT\10.2.0\ORADATA\ORCL\CONTROL01.CTL – modified
Control File G:\ORACLE\PRODUCT\10.2.0\ORADATA\ORCL\CONTROL02.CTL – modified
Control File G:\ORACLE\PRODUCT\10.2.0\ORADATA\ORCL\CONTROL03.CTL – modified
Datafile G:\ORACLE\PRODUCT\10.2.0\ORADATA\ORCL\SYSTEM01.DBF – wrote new name
Datafile G:\ORACLE\PRODUCT\10.2.0\ORADATA\ORCL\UNDOTBS01.DBF – wrote new name
Datafile G:\ORACLE\PRODUCT\10.2.0\ORADATA\ORCL\SYSAUX01.DBF – wrote new name
Datafile G:\ORACLE\PRODUCT\10.2.0\ORADATA\ORCL\USERS01.DBF – wrote new name
Datafile G:\ORACLE\PRODUCT\10.2.0\ORADATA\ORCL\EXAMPLE01.DBF – wrote new name
Datafile G:\ORACLE\PRODUCT\10.2.0\ORADATA\ORCL\TEMP01.DBF – wrote new name
Control File G:\ORACLE\PRODUCT\10.2.0\ORADATA\ORCL\CONTROL01.CTL – wrote new name
Control File G:\ORACLE\PRODUCT\10.2.0\ORADATA\ORCL\CONTROL02.CTL – wrote new name
Control File G:\ORACLE\PRODUCT\10.2.0\ORADATA\ORCL\CONTROL03.CTL – wrote new name
Instance shut down

Database name changed to NEWDB.
Modify parameter file and generate a new password file before restarting.
Succesfully changed database name.
DBNEWID – Completed succesfully.

6)Edit the pfile to change the db_name:

change the db_name parameter in the pfile to the new database name


7)Create a new password file using the ORAPWD utility

C:\mohd.dba>orapwd file=orapw001 password=confidential entries=10

8)Start the database using pfile:

sql>conn sys as sysdba

sql>startup pfile =G:\oracle\product\10.2.0\admin\orcl\pfile\init.ora.0122009171812

9)Recreate the spfile from the pfile

sql> create spfile from pfile=’G:\oracle\product\10.2.0\admin\orcl\pfile\init.ora.0122009171812′;

10) start the database using spfile:

SQL> startup force;
ORACLE instance started.

Total System Global Area 289406976 bytes
Fixed Size 1248600 bytes
Variable Size 92275368 bytes
Database Buffers 192937984 bytes
Redo Buffers 2945024 bytes
Database mounted.
Database opened.


2 thoughts on “To change the Database name using NID utility

  1. A kindly observation, you skip the one step, after shutdown the database, you must start it with MOUNT option without the NID utility will not work.



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