Oracle FAQ Your Portal to the Oracle Knowledge Grid
HOME | ASK QUESTION | ADD INFO | SEARCH | E-MAIL US
 

Home -> Community -> Mailing Lists -> Oracle-L -> RE: Renaming a database

RE: Renaming a database

From: Aponte, Tony <AponteT_at_hsn.net>
Date: Thu, 4 Jan 2001 13:38:22 -0500
Message-Id: <10731.125740@fatcity.com>


This article shows how to copy the database under a new name: http://www.oracle.com/oramag/oracle/99-Jan/19dba.html <http://www.oracle.com/oramag/oracle/99-Jan/19dba.html>  

Steps to do it in-place:

  1. Take a cold backup of the database.
  2. Backup the control file so you can edit the results using "alter database backup control file to trace".
  3. Edit the file produced in step to. Change the line CREATE CONTROLFILE REUSE DATABASE "OLDNAME" ....... to CREATE CONTROLFILE SET DATABASE "NEWNAME" RESETLOGS NOARCHIVELOG. Save it as a different name (E.I.. renamedb.sql)
  4. Copy the initoldname.ora (and configoldname.ora if ifile is in use) to initnewname.ora.
  5. Edit initnewname.ora and replace oldname to newname for db_name, MTS, etc. parameters.
  6. Connect to the oldname database and archive any pending redo logs with "alter system archive log all".
  7. Shut down oldname cleanly
  8. Change your environment to point to the newname database.
  9. Rename any control, data and/or password files with the newname if necessary.
  10. Start up server manager and run the edited trace file produced in step 3 (renamedb.sql in my example).
  11. Open the database with RESETLOGS.

At this point you should bounce the newname database to make sure everything is OK. Also, don't forget the forgotten files like oratab, listener, etc.  

You may need to correct some of my syntax since I did this mostly from memory.  

Good luck.    

 -----Original Message-----
From: Sanjay Kumar [mailto:ora_user_at_hotmail.com] Sent: Thursday, January 04, 2001 12:01 PM To: Multiple recipients of list ORACLE-L Subject: Renaming a database

Hi,  

How do I rename a database? If I rename a database, then what will happen to Received on Thu Jan 04 2001 - 12:38:22 CST

Original text of this message

HOME | ASK QUESTION | ADD INFO | SEARCH | E-MAIL US