This week's book giveaway is in the OO, Patterns, UML and Refactoring forum.
We're giving away four copies of Refactoring for Software Design Smells: Managing Technical Debt and have Girish Suryanarayana, Ganesh Samarthyam & Tushar Sharma on-line!
See this thread for details.
The moose likes JDBC and Relational Databases and the fly likes How to get SID of Connection From Java. Big Moose Saloon
  Search | Java FAQ | Recent Topics | Flagged Topics | Hot Topics | Zero Replies
Register / Login


JavaRanch » Java Forums » Databases » JDBC and Relational Databases
Bookmark "How to get SID of Connection From Java." Watch "How to get SID of Connection From Java." New topic
Author

How to get SID of Connection From Java.

Bennet Xavier
Ranch Hand

Joined: Jun 19, 2008
Posts: 162
Hi All,

I need to get the SID of each connection which is created using java Program.

I saw Connection SID in toad, which is unique for each connection.(I am not talking with the SID value that specified in tnsentry).

I need to get that information from java program itself, is it possible. if yes, please help.

Problem:

I need to find which connection from the POOL is being used by the program to execute different SQL statement.

Thanks

Bennet Xavier X.
Jan Cumps
Bartender

Joined: Dec 20, 2006
Posts: 2543
    
  10

Do these help (toad suggests you use Oracle)?
select instance_name from v$instance
select name from v$database

OCUP UML fundamental and ITIL foundation
 
I’ve looked at a lot of different solutions, and in my humble opinion Aspose is the way to go. Here’s the link: http://aspose.com
 
subject: How to get SID of Connection From Java.
 
It's not a secret anymore!