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: sudershan <virdi_at_interlog.com>
Date: 1997/11/01
Message-ID: <345AFA54.55E4@interlog.com>#1/1

gary e. robinson wrote:
>
> 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."

hi
The best way to rename the instance is to recreate the control file after starting the database in nomount state.

for example
set echo on;

spool crdbDBNAME.log

connect internal;

startup nomount;

create controlfile reuse
set database DBNAME

logfile '/u088/oradata/dfidgl00/log1.dbf' size 10M,
        '/u088/oradata/dfidgl00/log2.dbf' size 10M,
        '/u088/oradata/dfidgl00/log3.dbf' size 10M resetlogs
datafile '/u001/oradata/dfidgl00/system1.dbf' size 300M,
         '/u090/oradata/dfidgl00/temp.dbf' size 100M,
         '/u089/oradata/dfidgl00/data1.dbf'   size 300M,
         '/u087/oradata/dfidgl00/index4.dbf'  size 50M,
         '/u086/oradata/dfidgl00/rbs.dbf'     size 100M ;

ALTER DATABASE OPEN RESETLOGS; exit;

-- 
=====================================================
Sudershan Virdi			Tel:416-530-1849(Home)
#1608A,2350 Dundas Street West	Tel:416-864-2421(Off.)
Toronto,Ontario-M6P4B1		Email:virdi_at_interlog.com
Canada
=====================================================
Received on Sat Nov 01 1997 - 00:00:00 CST

Original text of this message

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