OCP Blog
Super DBA
How change DBID and DBNAME for Oracle Database
by Vazha Mantua Monday, June 18, 2012 3:46 PM


Main method changing dbname of database is recreating controlfile with set new name condition, but after this operation DBID will not changed.

Oracle Provide very simple tool, which help you change both DBID and DBNAME.


When the DBID of a database is changed, all previous backups and archived logs of the database become unusable. After you change the DBID, you must open the database with the RESETLOG option, which re-creates the online redo logs, that’s why you should make a backup of the whole database immediately after changing the DBID. During changing DBID database change DBID for all datafiles and controlfiles.

Changing the DBNAME without changing the DBID does not require you to open with the RESETLOGS option, so database backups and archived logs are not invalidated, additionally You must change the DB_NAME initialization parameter after a database name change to reflect the new name. Also, you may have to re-create the Oracle password file. If you restore an old backup of the control file (before the name change), then you should use the initialization parameter file and password file from before the database name change,During changing DBNAME database change DBID for only controlfile not datafiles!

Let See example :

1. Ensure that you have validate backup

2.Shutdown database and startup in mount mode

3.To change the database name in addition to the DBID, specify the DBNAME parameter. This example changes the name to NEW_SID, also you should configure net service for connecting DB.

     $ORACLE_HOME/product/11.2.0/bin/nid   TARGET=SYS/password@test DBNAME=NEW_SID


4. After changing DBID and DBNAME ,you should change DB_NAME parameter on SPFILE(PFILE), shutdown database, mount it and open with resetlog option.


If you want only change DBNAME you should run command:

$ORACLE_HOME/product/11.2.0/bin/nid TARGET=SYS/password@test DBNAME=NEW_SID SETNAME=YES


For this case you don’t need open database with resetlog clause, but for both cases you should recreate password file.


Comments (7) -

6/24/2012 9:14:55 AM #

Nursing Home

Thanks this really helpful i have no words for this post.

Nursing Home United States

6/27/2012 2:12:36 AM #

apartment software

your site are really nice and also neat and clean keep it update as you can but like neat and clean.

apartment software United States

7/10/2012 12:19:19 PM #

 Zei Cinofilia

Select the tables you want to use in Access and connect. You should be to see the tables within Access. Create a new link table from Table tab within Access. Use the data source created above and you should be able to see all Oracle tables.

Zei Cinofilia

7/30/2012 6:13:24 PM #

mobile booster

Great work, thank you that you did work for us ))

mobile booster

8/1/2012 12:50:12 PM #


It is designed specifically for word processing, but it has more capabilities than that. It can do basic desktop publishing, create graphs and serve as a basic, flat-file database.

eleanorrenfro United States

8/2/2012 9:39:23 AM #

attorney internet marketing

WOW! What an awesome and cool post thanks for share because i don't know about the change now i will try.

attorney internet marketing United States

8/30/2012 10:46:59 PM #

Language Exchange Chat

Thanks this really helpful i have no words for this post.

Language Exchange Chat United States

Add comment

  Country flag

  • Comment
  • Preview

Filter by APML


<<  August 2020  >>

View posts in large calendar