Oracle FAQ | Your Portal to the Oracle Knowledge Grid |
Home -> Community -> Usenet -> c.d.o.server -> Re: Any variable that uniquely identify a DB instance?
Two other sources are:
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