Re: Connection info in SQLPlus?
Date: 1998/01/16
Message-ID: <Pine.SOL.3.96.980116140739.20103A-100000_at_kazakhstan.it.earthlink.net>#1/1
No even close. The truth is, my_db is just a tnsname defined on the client site, so there is no way to find that out from the server site. However,
select name from v$database;
will give you the instance name on the server.
On Fri, 16 Jan 1998, Fred Pierce wrote:
> > Is it possible to get the service I'm connected to in SQL*Plus?
> > When I connect like this:
> >
> > connect scott/tiger_at_my_db
> >
> > I can get the name of the current user 'scott' using
> >
> > show user
> >
> > But how can I get 'my_db'?
>
> select name from v$database;
>
> fdp
>
> -------------------------------------------------------
> Fred Pierce - QSS Group Inc. Oracle DBA (301) 286-6899
> fpierce_at_nssdc.gsfc.nasa.gov fpierce_at_avialantic.com
> Mid Atlantic Aviation on the Web - www.avialantic.com
> MAAM WWII Commemorative Weekend June 5-7 /maamwwii.html
> --------------------------------------------------------
>
>
Max Chern, Senior Software Engineer/DBA | Voice: 626-296-5014
EarthLink Network, Inc. | Fax: 626-296-5113 maxchern_at_earthlink.net | 3100 New York Drive, Ste. 201 http://www.earthlink.net/ | Pasadena, CA 91107Received on Fri Jan 16 1998 - 00:00:00 CET