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: How to get the current TNS service name?

Re: How to get the current TNS service name?

From: Dino Hsu <dino1_at_ms1.hinet.net>
Date: Sat, 11 Aug 2001 07:22:31 +0800
Message-ID: <mtq8ntsv770i7n5d5d4ln23r6fnfbi9coj@4ax.com>

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

Original text of this message

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