Database Technologies‎ > ‎Oracle‎ > ‎

Changing database name and/or database id using NID


Oracle NID utility

NID is utility to change the database name and/or database id.


1) Backup the database
2) shutdown the database
3) startup mount, the database

4) Here you use the NID utility, through command execute the following

 nid target=sys/<password>@<old_database> dbname=<new_database_name>

For example
For change local database philips to samsung do the following

set oracle_sid=philips
nid target=sys/oracle123$ dbname=samsung

After these modification will be made to control file and datafile

Now shut the database
SQL>shut immediate

Now we need to change the db_name in the pfile or spfile
modify the pfile and start the database, if using spfile mount the database
and issue

SQL>alter system set db_name=samsung scope=spfile;
SQL>shut immediate

If required modify the service id (in windows)
then open the database with resetlogs

SQL>alter database open resetlogs;