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: How can i get database name?

Re: How can i get database name?

From: Erwin Dondorp <erwindon_at_wxs.nl>
Date: Tue, 03 Apr 2001 21:41:37 +0200
Message-ID: <3ACA2771.170E8FFC@wxs.nl>

JimmyN1 wrote:

> select global_name from global_name

As always there seems to be confusion about the different names that exist in
an Oracle database environment. There are several: 1) database name

    This is how the database knows itself. The names is stored in all control-,

    log- and datafiles.
    How to see it: SELECT name FROM v$database     How to change it: recreate controlfile with SET DATABASE option 2) global name

    This is a world-wide unique name of your database.      (Not many people bother to actually make it unique though)     How to see it: SELECT global_name FROM global_name     By default it is the same as your database name + ".world", or the same as

    just your database name, that depends on the server version.     How to change it: ALTER DATABASE RENAME GLOBAL_NAME TO ... 3) sid

    This is the name of the group of processes that *run* the database     How to see it: SELECT instance_name FROM v$instance     How to change it: stop database, rename initfile, set ORACLE_SID, change oratab, restart

    Usually this is the same as your database name, but e.g. Oracle Parallel Servers

    have multiple sids per database, so that does not hold. 4) tnsname

    This is a name that is given to the set of parameters that you need to find

    your database.
    These definitions are stored in a tnsnames.ora file, a Oracle Names server,

    a Novell Directory Server, a LDAP server, etc.

Take care of what name you are talking about!

Sorry for the lecture,

    E. Received on Tue Apr 03 2001 - 14:41:37 CDT

Original text of this message

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