Re: DB_NAME in init.ora

From: Steve Butler <sbut-is_at_seatimes.com>
Date: 1995/11/15
Message-ID: <Pine.SUN.3.91.951115180722.5475F-100000_at_seatimes>#1/1


My experience with ORACLE is only on UNIX. But, on a UNIX box, the database doesn't record the SID. In fact, you could have more than one instance using the same database (different PFILEs though).

The way that ORACLE finds the correct PFILE is as follows:

  1. It looks at the $ORACLE_SID environmental variable to find what SID to which you wish to connect.
  2. Then opens the file $ORACLE_HOME/dbs/init$ORACLE_SID.ora So, if your $ORACLE_SID was DOCS_PRD, then oracle attempts to open the pfile (at startup only) $ORACLE_HOME/dbs/initDOCS_PRD.ora.
  3. It also uses the $ORACLE_SID to name the instance processes (at startup).
  4. Thereafter, it simply uses the $ORACLE_SID to contact the already running processes on the box.

This should give enough clues as what needs to change, but I'll try to be more explicit:

  1. Shutdown the instance.
  2. Rename the initXXXX.ora file in $ORACLE_HOME/dbs to reflect the new instance SID. If you are using the OFA, then you will have to drop and recreate the softlink back to the initSID.ora file which should be in $ORACLE_BASE/admin/yyyyy/pfile/initXXXX.ora where yyyy is the database name and XXXXX is the SID.
  3. Be sure the change the /etc/oratab file to reflect the new SID value.
  4. Invoke . oraenv to change your $ORACLE_SID (and test /etc/oratab).
  5. Startup the instance. [Fix problems and try step E again.]

On 14 Nov 1995, Robert & Jennifer Kuropkat wrote:

> I believe you have to use the 'alter database rename
> global_name to <db_name>' command. This changes the db_name
> in the control files, etc. Then you change the db_name
> paramter in the init.ora. This does not howver [I belive]
> change the SID. I don't think there is a way to change this.
>
> Robert Kuropkat
> rkuropka_at_avalon.COM
> rjkurop_at_primenet.com
>
>
>
>

+----------------------------------------------------+
| Steve Butler          Voice:  206-464-2998         |
| The Seattle Times       Fax:  206-382-8898         |
| PO Box 70          Internet:  sbut-is_at_seatimes.com |
| Seattle, WA 98111    Packet:  KG7JE_at_N6EQZ.WA       |
+----------------------------------------------------+
All standard and non-standard disclaimers apply. All other sources are annonymous. Received on Wed Nov 15 1995 - 00:00:00 CET

Original text of this message