dbTalk Databases Forums  

getting the tns entry for a connection?

comp.databases.oracle.misc comp.databases.oracle.misc


Discuss getting the tns entry for a connection? in the comp.databases.oracle.misc forum.



Reply
 
Thread Tools Display Modes
  #1  
Old   
mh@pixar.com
 
Posts: n/a

Default getting the tns entry for a connection? - 05-28-2009 , 02:44 AM






If I connect to scott/tiger@FOO, is it possible to get
a copy of the FOO TNS definition?

I'm doing some connection testing, and I want to print
out TNS of the current connection so I can verify I'm
testing the right options.

Many TIA!!
Mark

--
Mark Harrison
Pixar Animation Studios

Reply With Quote
  #2  
Old   
joel garry
 
Posts: n/a

Default Re: getting the tns entry for a connection? - 05-28-2009 , 12:22 PM






On May 28, 12:44*am, m... (AT) pixar (DOT) com wrote:
Quote:
If I connect to scott/tiger@FOO, is it possible to get
a copy of the FOO TNS definition?

I'm doing some connection testing, and I want to print
out TNS of the current connection so I can verify I'm
testing the right options.

Also see the OracleŽ Database Net Services Administrator's Guide about
Troubleshooting Oracle Net Services, you may be interested in the log
and tracing abilities.

jg
--
@home.com is bogus.
http://www.thestandard.com/news/2009...y-one-chairman


Reply With Quote
  #3  
Old   
Malcolm Dew-Jones
 
Posts: n/a

Default Re: getting the tns entry for a connection? - 05-28-2009 , 12:52 PM



mh (AT) pixar (DOT) com wrote:
: If I connect to scott/tiger@FOO, is it possible to get
: a copy of the FOO TNS definition?

: I'm doing some connection testing, and I want to print
: out TNS of the current connection so I can verify I'm
: testing the right options.

Do you mean from within the database while connected?

In sqlplus I use

select
'&_O_RELEASE' Release,
USER Username,
global_name
-- , 'and _CONNECT_IDENTIFIER' CONNECT_STRING
from global_name;


I forget which version you need to be able to use &_CONNECT_IDENTIFIER.

Global name does not depend on sqlplus, but the & vars do (and can also be
easily viewed by just typing DEF with no parameters in sqlplus.

Also look at SYS_CONTEXT('USERENV',xx), it has some things that are
useful, in this case you might be interested in DB_DOMAIN DB_NAME
DB_UNIQUE_NAME HOST, and maybe others.

$0.10


Reply With Quote
Reply




Thread Tools
Display Modes

Posting Rules
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts

vB code is On
Smilies are On
[IMG] code is On
HTML code is Off



Powered by vBulletin Version 3.5.3
Copyright ©2000 - 2012, Jelsoft Enterprises Ltd.