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

Home -> Community -> Usenet -> c.d.o.server -> Re: Database name embedded in controlfile -- redundant?

Re: Database name embedded in controlfile -- redundant?

From: Joel Garry <joelga_at_pebble.org>
Date: Tue, 26 May 1998 23:40:43 GMT
Message-Id: <slrn6mmkti.65l.joelga@pebble.org>


On Tue, 26 May 1998 09:42:08 GMT, johnvue_at_gte.net <johnvue_at_gte.net> wrote:
>If that's true then what does Oracle do with the database name
>specified as part of the "CREATE DATABASE XYZ" command?
>
>Here's where XYZ is specified:
>ORACLE_SID=XYZ
>DB_NAME = XYZ (in init.ora)
>CREATE DATABASE XYZ ...
>
>Since Oracle is supposedly using the "XYZ" in init.ora to stamp the
>newly created control file, redo logs and SYSTEM datafile, what does
>it do with the "XYZ" in "CREATE DATABASE"?
>
>Or put another way, if Oracle is using the "XYZ" in "CREATE DATABASE"
>to stamp the newly created control file, redo logs and SYSTEM
>datafile, what does it do with the "XYZ" in init.ora?

It uses it to check against if GLOBAL_NAMES is set to true. DB_NAME doesn't need to be specified, but if it is, it must match the CREATE DATABASE name. If not specified, you must specify it for startup or alter database mount for each instance in parallel server. This is before the controlfile is opened. The name in the control file is either from the init.ora or the create database. If you don't use one in the create statement, it uses the one in init.ora.

>
>Everyone seems to agree that the "XYZ" in ORACLE_SID is only used to
>find the default initXYZ.ora upon startup when no "pfile=" is
>specified.
>
>--------------------------------
>During the database creation, the DB_NAME parameter is used for
>recording the database name in redo logs ,datafiles and control files.
>If during the database startup the value of DB_NAME parameter and
>database name in control file are not name,the database won't start
>
>
>-----Original Message-----
>>What is the exact relationship between the database name in CREATE
>>DATABASE and the DB_NAME parameter in init.ora?
>>
>>Is there ever a legitimate reason for not making them the same?
>>
>>It seems that ORACLE_SID environment variable tells Oracle about which
>>init<SID>.ora to use. It doesn't use the environment variable to
>>match up with the database name embedded within the controlfile.
>>
>>What is the purpose of having the database name inside the
>>controlfile? Redundancy?
>

--
These opinions are my own and not necessarily those of Information Quest

or Pebble In The Sky                     http://www.informationquest.com

http://ourworld.compuserve.com/homepages/joel_garry jgarry@nospameiq.com
"See your DBA?"  I AM the @#%*& DBA!     Remove nospam to reply.  Sorry.
Received on Tue May 26 1998 - 18:40:43 CDT

Original text of this message

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