Steps To Rename a Database

How to rename the database?

By V.Chandra Mohan

Follow these steps to rename a database:  

1. Start by making a full database backup of your database (in case you need to restore if this procedure is not working).  

2. Execute this command from sqlplus while connected to 'SYS AS SYSDBA': 

ALTER DATABASE BACKUP CONTROLFILE TO TRACE RESETLOGS;

3. Locate the latest dump file in your USER_DUMP_DEST directory (show parameter USER_DUMP_DEST) - rename it to something like dbrename.sql. 

4. Edit dbrename.sql, remove all headers and comments, and change the database's name. Also change "CREATE CONTROLFILE REUSE ..." to "CREATE CONTROLFILE SET ...". 

5. Shutdown the database (use SHUTDOWN NORMAL or IMMEDIATE, don't ABORT!) and run dbrename.sql. 

6. Rename the database's global name: 

ALTER DATABASE RENAME GLOBAL_NAME TO new_db_name;

Have a Oracle Question
Do you have an Oracle Question?

Oracle Books
Oracle Certification, Database Administration, SQL, Application, Programming Reference Books

Oracle Home
Oracle Database, SQL, Application, Programming Tips

All the site contents are Copyright © www.erpgreat.com and the content authors. All rights reserved.
All product names are trademarks of their respective companies.
The site www.erpgreat.com is not affiliated with or endorsed by any company listed at this site.
Every effort is made to ensure the content integrity.  Information used on this site is at your own risk.
 The content on this site may not be reproduced or redistributed without the express written permission of
www.erpgreat.com or the content authors.