Re: Changing Oracle DB_NAME
Date: 1996/08/07
Message-ID: <4ua6dr$i4u_at_watnews1.watson.ibm.com>#1/1
In <4u8tg3$23j_at_Darkstar.siberia.ru>, dfly_at_infinet.com writes:
>In article <4toc3b$qtg_at_dfw-ixnews8.ix.netcom.com>,
>Rajib Ghosh <rghosh_at_ix.netcom.com> wrote:
>} Does anyone know the sequence of steps to changing the Oracle database
>} name without rebuilding an Oracle database.
>} I would appreciate if you could email your answers to the address
>} given below
>
>that's not trivial.
>The complete procedure for ranaming a database
>was published in Oracle magazine few issues ago.
>
>Serge
>
>}
>} Thanks
>} Rajib Ghosh
>} rghosh_at_ix.netcom.com
>}
>
I am assuming you will have backed up your system before attempting this.
- in sqldba (as internal):
alter database backup control file to trace; shutdown;
This will create the create control file syntax for your database in a trace file.
2) Edit the trace file just created and change the line:
REUSE DATABASE "YourDBName" to
SET DATABASE "YourNewDBName"
Change NORESETLOGS to RESETLOGS
This would also be a good time to up the MAXDATAFILES value if you are getting anywhere near the current value.
If your last shutdown was normal comment out the line RECOVER DATABASE.
Save the file as rnamedb.sql (or whatever you want to call it).
3) Rename your existing control files to xxxx.old where xxxx is your
current control file name.
4) in sqldba (as internal):
startup nomount;
_at_rnamedb.sql -- this is the edited trace file you just saved
alter database open resetlogs;
alter database rename global_name to YourNewDBName;
That's it.
M.Landa Received on Wed Aug 07 1996 - 00:00:00 CEST