Oracle FAQ | Your Portal to the Oracle Knowledge Grid |
Home -> Community -> Usenet -> c.d.o.server -> Re: How to get the current TNS service name?
On Tue, 7 Aug 2001 14:01:09 -0400, "Vincent Ventrone" <vav_at_brandeis.edu> wrote:
>> After we connect to Oracle with SQL*Plus and
>> username/password_at_service_name descriptor, how do get the current TNS
>> service name (connect string) of this session? As is the case when we
>
>I doubt that you can -- seems to me that the service name & connect string
>are used by SQLNet/Net8 components & are not known to the session itself
>once the connection is made.
>
If TNS service name (connect string) is not accessible, how about host name and SID/DB service name? AFAIK, [TNS service name]=[host name]+SID or [host name]+[DB service name] (protocol and port seldom change, so not included here), so I can identify the database of current session by the host name and (SID or DB service name).
Dino Received on Fri Aug 10 2001 - 18:22:31 CDT