Oracle FAQ | Your Portal to the Oracle Knowledge Grid |
![]() |
![]() |
Home -> Community -> Usenet -> c.d.o.server -> Re: Change the DB_NAME How to ?
Rich Woods wrote:
> Erik Oosterling wrote:
[..]
> > Is there a way to change the database name used in the INIT.ORA
[..]
> alter database rename global_name to <newdbname>.<domain>;
That doesn't do the whole job. Here's how I had to do it:
create controlfile reuse database "OLD" noresetlogs
it says instead:
create controlfile reuse set database "NEW" resetlogs
(OLD and NEW should be changed to the old and new database names, of course.)
While you are modifying the trace file, remove all the commands other than the CREATE CONTROLFILE command.
5) Modify the INIT.ORA file so that the DB_NAME is the new one. 6) Modify the SQL*Net configuration files LISTENER.ORA and TNSNAMES.ORA
to reflect the new database name.
7) Erase the old control files. (You *did* back them up, right?) 8) Use Server Manager or SQL*DBA to connect, and do a STARTUP NOMOUNT. 9) Run the "create controlfile" script from step 4.10) Issue the command "alter database open resetlogs;" ...and wait a while
for the command to complete.
11) Do a shutdown/restart just to make sure.
12) If you're using a dumb Microsoft operating system (NT), you may need
to
rebuild the SID using oradim.
13) When the database is open again, issue the "alter database rename
global_name..." command as suggested by Mr. Woods.
HTH, -Brett Neumeier Received on Fri Aug 15 1997 - 00:00:00 CDT
![]() |
![]() |