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: Any variable that uniquely identify a DB instance?

Re: Any variable that uniquely identify a DB instance?

From: Daniel A. Morgan <dmorgan_at_exesolutions.com>
Date: Sun, 10 Dec 2000 23:37:29 -0800
Message-ID: <3A348439.C9344E64@exesolutions.com>

Two other sources are:

  1. SELECT instance FROM v$thread;

and

2. Look in the initSID.ora file.

Dan Morgan

buckeye714_at_my-deja.com wrote:

> In article <8tlpni$ebr$1_at_news.seed.net.tw>,
> "Ron TJ HUANG" <ron_huang_at_psitech.com.tw> wrote:
> > Dear all,
> >
> > Is there any environment variable in the DB that uniquely identify a
> > database instance?
> >
> > Many thanks.
> >
> > Ron.
> >
> >
> If you have access to the system tables, you can use :
> SELECT name FROM v$database;
>
> Otherwise, SELECT * FROM global_name;, will give you the global name of
> the database. I believe this defaults to the sid, but it is modifiable
> via 'ALTER DATABASE RENAME GLOBAL_NAME TO <new_name>. This means that
> you might not get the sid from SELECT * FROM GLOBAL_NAME;, but you
> should be able to determine which database you are in.
>
> HTH,
> Patrick
>
> Sent via Deja.com http://www.deja.com/
> Before you buy.
  Received on Mon Dec 11 2000 - 01:37:29 CST

Original text of this message

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