Re: Rename ORACLE_SID?

From: Tony Noble <tnoble_at_mt.gov>
Date: 1996/07/22
Message-ID: <4t0s2l$fnc_at_umt.umt.edu>#1/1


In article <4sot5t$1gf_at_nntp1.best.com>, sidepage_at_nntp.best.com says...
>
>Hello All,
> Does anyone know of an easy method to rename an Oracle 's
>instance? I would think using exp/imp might do the trick, after
>creating a new database, but that takes too long...
>
>-mike

Yes, you can rename the instance and/or the database. The procedure varies slightly depending on your platform.

In general though to change the instance name:

1. shutdown the database
2. create a new password file for the new SID, if you're using them...
3. rename the parameter file to init%newsid%.ora
4. ensure that you have the control_files= parameter in the init file
5. set the sid indicator according to your OS, eg. unix 'set oracle_sid=???'
6. start sqldba and start the database.

For a more complete discussion see
Oracle Worldwide Support Bulletins #108636.987, #106373.655

To change the dbname:

1. start sqldba
2. connect internal
3. alter database backup controlfile to trace;
4. shutdown the database
5. do a full backup

   (you always do before attempting anything like this anyway, don't you?) 6. open the trace file in an editor and copy out the 'CREATE CONTROLFILE...'

   command into a new file, eg. newdb.sql 7. edit newdb.sql and change the dbname, change REUSE to SET and change

   NORESETLOGS to RESETLOGS
8. rename the old control files for safekeeping 9. change the db_name parameter in the init file (initSID.ora)

10. start sqldba
11. connect internal
12. startup nomount
13. _at_newdb.sql

14 alter database open;

For a more complete discussion see
Oracle Worldwide Support Bulletin #106373.655

-- 
Tony Noble
tnoble_at_mt.gov
Opinions expressed do not necessarily reflect those of my employer.
Received on Mon Jul 22 1996 - 00:00:00 CEST

Original text of this message