Oracle FAQ | Your Portal to the Oracle Knowledge Grid |
![]() |
![]() |
Home -> Community -> Usenet -> c.d.o.server -> Re: Database name confusion
TurkBear wrote:
> Where is the database name set?
The database name is set when the database is created (CREATE DATABASE)
Or when new controlfiles are created (CREATE CONTROLFILE SET DATABASE)
The name of the database can be found with: SELECT name FROM v$database
This should be the same name as the parameter db_name from the initfile.
The db_name in the initfile is only a default name that is to be used,
if you don't use db_name in the initfile, you have to specify a name
when starting the database.
In both cases the database name must match the name that is inside the
database.
> In the init<sid>.ora file for the 7.3.4 the database name is set to Oracle, yet
> when I query global_name it returns HRO1.WORLD ( which is an alias in my
> tnsnames.ora file)
A tnsname refers to a SID that can be reached at a network address.
The tnsname itself can be anything.
> In the 8.1.5 the database name is set ( in the init file) to myora and the
> domain is world, yet select * from global_name returns ORACLE -
> Help, I'm confused -
The global name of the database is set to <db_name>.world at creation
time.
it can however be changed to (almost) anything you like using the
relevant
ALTER DATABASE command.
> This is making the creation of database links in my 8.1.5 system very confusing,
> since it seems to need the database name as the link name...
This is indeed enforced when the parameter global_names=true.
Otherwise you can use any database link name.
I'm not sure whether this removes all confusion...
--
Erwin Dondorp
<http://www.dondorp.com/>
Received on Mon Dec 13 1999 - 16:54:32 CST
![]() |
![]() |