Home » RDBMS Server » Server Administration » rename a database
rename a database [message #58660] Wed, 24 September 2003 11:17 Go to next message
fengq
Messages: 38
Registered: October 2002
Member
Hi everyone
Could you please tell me how can I rename a database??

Thanks!!
Re: rename a database [message #58662 is a reply to message #58660] Wed, 24 September 2003 12:25 Go to previous message
Mahesh Rajendran
Messages: 10707
Registered: March 2002
Location: oracleDocoVille
Senior Member
Account Moderator
 
though , the procedure worked for me many times in many environments,
UNLESS YOU HAVE a thorough idea of what you are doing, don'nt do is to any
database of some importance. 

1.  prepare the database to be 'clean'.
    imean , no users logged in no transactions.
    switch the logfiles.
    backup the controlfile to trace with resetlogs option.
    if you are using spfile, create a pfile from it.
    shutdown the database ( clean shutdown NOT immediate or abort).
2.  take a compelete backup ( OS cold backup) of all datafiles, pfile, spfile,controlfiles,logfiles etc. and store it somewhere
3.  edit the traced control file ( take a copy of traced control file, as a backup with original entries).
    you would see the contents like
    
   	create controlfile reuse database "databasename" .....
        recover database using backup controlfile ........
      
    change them to

	create controlfile set database "databasename" .....
       #recover database using backup controlfile ........ -- (just comment it off)

    and make sure u have the statement like this at EOF
       
       alter database open resetlogs; 

4.   edit pfile to reflect the changes in dbname udump, dbump etc etc..
5.   run the script logged in "/as sysdba"
6.   if everything is okie, your database is renamed. recreate your spfile from pfile
     shutdown and startup (using spfile, if u are using spfile)
    	

Previous Topic: checkpoint
Next Topic: Oracle parameters
Goto Forum:
  


Current Time: Fri Sep 20 08:16:17 CDT 2024