aspose file tools*
The moose likes JDBC and the fly likes How to get SERVICE_NAME Big Moose Saloon
  Search | Java FAQ | Recent Topics | Flagged Topics | Hot Topics | Zero Replies
Register / Login
JavaRanch » Java Forums » Databases » JDBC
Bookmark "How to get SERVICE_NAME" Watch "How to get SERVICE_NAME" New topic
Author

How to get SERVICE_NAME

Arun raghvan
Ranch Hand

Joined: Aug 22, 2010
Posts: 75
How to get service_name of oracle (not manually from tnsname.ora) ..through Query
Paul Sturrock
Bartender

Joined: Apr 14, 2004
Posts: 10336

If you have already connected to Oracle to run said query, why do you need to know the service name (if there is one).


JavaRanch FAQ HowToAskQuestionsOnJavaRanch
Tom Reilly
Rancher

Joined: Jun 01, 2010
Posts: 618
I don't have access to an Oracle instance so I have not tried it but this link looks promising: http://download-west.oracle.com/docs/cd/B19306_01/server.102/b14200/functions165.htm#i1038176. Can you reply back if successful?
Tom Reilly
Rancher

Joined: Jun 01, 2010
Posts: 618
That URL didn't work for me. Here's the raw text:

http://download-west.oracle.com/docs/cd/B19306_01/server.102/b14200/functions165.htm#i1038176
Rene Larsen
Ranch Hand

Joined: Oct 12, 2001
Posts: 1179

AFAIK you can not get a list of all available service_names (or SIDs if service_names are not used) without connecting to a DB first with a user with SYSDB roll.


Regards, Rene Larsen
Dropbox Invite
 
I agree. Here's the link: http://aspose.com/file-tools
 
subject: How to get SERVICE_NAME