Oracle FAQ Your Portal to the Oracle Knowledge Grid
HOME | ASK QUESTION | ADD INFO | SEARCH | E-MAIL US
 

Home -> Community -> Usenet -> c.d.o.misc -> Re: Simple way to rename an instance?

Re: Simple way to rename an instance?

From: Mark Shirley <mshirley_at_ms320.demon.co.uk>
Date: 1997/11/02
Message-ID: <01bce77e$8a091d80$0100007f@user>#1/1

you can generate a create control file statement into a trace file using the following command's (Befor doing this shutdown the other database and change any changed file back so that the copy that you want to rename ca be rought up without any errors. Do this then as in svrmgrl do the following.

svrmgrl
SVRMGR> connect internal

SVRMGR> alter database backup controlfile to trace;

This will create a trace file that contains the following type of statement. Don't attempt to use this example file as it does not map to the structure of you database. Use the file that should be in the background trace directroy.

# Recovery is required if any of the datafiles are restored backups,
# or if the last shutdown was not normal or immediate.
#RECOVER DATABASE

# Database can now be opened normally.
ALTER DATABASE OPEN ; This file needs to be edited as follows :-

  1. Change the line starting ...

CREATE CONTROLFILE REUSE DATABASE "ORACLE" NORESETLOGS NOARCHIVELOG to
CREATE CONTROLFILE SET DATABASE "NEWSID" RESETLOGS NOARCHIVELOG 2. Change any file locations as required.

Comment out the recover database line/

3. Change the ALTER DATABASE OPEN ; to be ALTER DATABASE OPEN reset logs.

You should then have a database that is open and ready for user do some checks sutch as check the status of datafiles. select * from v$datafile for svrmgr. do the same for log files. Please note that this will leave this database in non archive log mode.

IMPORTANT.

  1. Insure you have a backup of the database befor you do this.
  2. If you are not happy with the consept of what you are trying to achive contact ORACLE World Wide Support.
  3. Onece the database is back up take a backup befor letting the users on.

I hope this helps

PS Editing control files or datafiles is not supported so don't be tempted to use a hex editor to attempt to rename a database. there are detais stored in all oracle file header that will meen that the datase will not start you must use the above procedure or export and import.

Please excuse the spelling I am dislexic and in a rush..

Best Regards

Mark.S

mshirley_at_ms320_demon_co_uk

Please replace the _ with . to mail.

gary e. robinson <ger_at_world.std.com> wrote in article <345bcdd3.14593282_at_nntp.cb.lucent.com>...
> Hi,
>
> Any suggestions?
>
> I just did a fresh install of Oracle 7.2.2 on Sun Sparc Solaris 2.5.1
> and I need to change the instance name due to a conflict.
>
> I impulsively edited and renamed lots o'files like initX.ora,
> configX.ora, data files, control files, listener.ora, tnsnames.ora,
> etc, etc, but find that the CONTROL FILE is now holding things up with
> the following error: (Silly me.)
>
> SQLDBA> startup
> ORACLE instance started.
> ORA-01103: database name 'A' in control file is not 'REPO'
> Attempting to shutdown instance........ORACLE instance shut down.
>
> Must I rename every object from *within* Oracle in order to keep the
> control file up to date?
>
> (Sure would be nice to take binary file editor to the control file.)
>
> Thanks in advance,
> Gary Robinson
> Gary E. Robinson
> ger_at_world.std.com
> "eschew obfuscation such as this."
>
Received on Sun Nov 02 1997 - 00:00:00 CST

Original text of this message

HOME | ASK QUESTION | ADD INFO | SEARCH | E-MAIL US