From: denevge@my-deja.com
Newsgroups: comp.databases.oracle.server
Subject: Re: which database i am using?
Date: Tue, 12 Dec 2000 15:19:01 GMT
Organization: Deja.com - Before you buy.
Lines: 58
Message-ID: <915fkt$g0b$1@nnrp1.deja.com>
References: <915ck8$d9o$1@nnrp1.deja.com> <915etq$fce$1@nnrp1.deja.com>
NNTP-Posting-Host: 194.7.184.218
X-Article-Creation-Date: Tue Dec 12 15:19:01 2000 GMT
X-Http-User-Agent: Mozilla/4.0 (compatible; MSIE 5.0; Windows 98; DigExt)
X-Http-Proxy: 1.1 x63.deja.com:80 (Squid/1.1.22) for client 194.7.184.218
X-MyDeja-Info: XMYDJUIDdenevge


If global_name has been set :

select global_name from global_name

Hope this helps
Gert

In article <915etq$fce$1@nnrp1.deja.com>,
  Mark D Powell <markp7832@my-deja.com> wrote:
> In article <915ck8$d9o$1@nnrp1.deja.com>,
>   senthil <rsenthilkumar@my-deja.com> wrote:
> > hi,
> >
> > i am an user without dba priveleges and would like to query a
> > table/view that gives the database name. anybody knows the
 table/view
> > name???
> >
> > thanks,
> > senthil.
> >
> The only tables/views I can think of that provide the database and
> instance name are all v$ views which require special privilege to
> select against.  The DBA can grant anyone select on these views using
> the sys id, and probably would be willing to do this for a limited
> number of them.  Also the Oracle provided role select_catalog_role and
> select any table privilege will provide access to these views.
>
> The views of interest are v$database and v$instance.
>
> From UNIX you can do a ps -ef | grep pmon to see the Oracle databases
> that are up and running on a box.
>
> You can do a print $TWO_TASK to see the Oracle Net default connect
> string Net8 alias. (Print is ksh use echo for borne shell)
>
> Also you can print the $ORACLE_SID to see the default instance, but
 the
> TWO_TASK parameter, if set, overrides the SID.
>
> If the DBA does not wish to grant the roles, privileges, or individual
> access mentioned above (and there are legitimate reasons not to give
> access to these views) then ask him if he would create a procedure you
> could call that gives this information.  Many sites have such a
 routine
> to give this type of information.
>
> --
> Mark D. Powell  -- The only advice that counts is the advice that
>  you follow so follow your own advice --
>
> Sent via Deja.com http://www.deja.com/
> Before you buy.
>


Sent via Deja.com http://www.deja.com/
Before you buy.

