Re: Change the DB_NAME ?????????????
Date: 1997/12/03
Message-ID: <34857304.B82B956F_at_mema.mail.fedex.com>#1/1
Erik -
You just need to recreate the control file with the correct database
name in it. Following is a bulletin put out by Oracle Support on how
to do it for Unix boxes. Since i'm not NT-literate, you'll have to
make adjustments (like how to run the ccf.sql file .. instead of _at_ccf
you'll run it some other way)
hope that helps.
Rick
Changing the dbname for a database
- sqldba
- connect internal
- alter database backup controlfile to trace; This will write in a trace file, the CREATE CONTROLFILE command that would recreate the controlfile as it currently exists.
- Exit and go to the directory where your trace files are located. They are usually in the $ORACLE_HOME/rdbms/log directory. If user_dump_dest is set in the initSID.ora, then go to the directory listed in the user_dump_dest variable. The trace file will have the form "ora_NNNN.trc with NNNN being a number.
- Get the CREATE CONTROLFILE command from the trace file and put it in a new file called something like ccf.sql.
- Edit the ccf.sql file and modify the CREATE CONTROLFILE command. Just change the word "REUSE" to "SET",and "NORESETLOGS" to "RESETLOGS", and modify the dbname. Old line: CREATE CONTROLFILE REUSE DATABASE "olddbname" NORESETLOGS ... New line: CREATE CONTROLFILE set DATABASE "newdbname" RESETLOGS ... Then save the ccf.sql file.
- Rename the old control files for backup purposes and so they are not in the way of creating the new ones.
- Edit initSID.ora so that db_name="newdbname".
- sqldba
- connect internal
- startup nomount
- _at_ccf
- alter database open;
- Make sure the database is working. Shutdown and backup the database.
Erik Oosterling wrote:
>
> I got a problem.
> i got a NT server with 5 oracle database (7.2.2.4 version). Now yout
> thinking that's no problem. But all the databases have the same name
> (default value : oracle). I i try to change the db_name in the init.ora is
> receive a error that the name is not the same as the controlfile is
> expecting and the db will not start.
> Is there a way to change this easy ?
> Thank you !
> PS
> within a few weeks we will migrate to 7.3.3. !
> --
> please remove .NOSPAM from email addres for email replies.
> Apologies for cloaking my address.
-- Rick Muffler Federal Express Corporation 719-262-1305Received on Wed Dec 03 1997 - 00:00:00 CET