Home | Contact Us | FAQ | Search & Site Map | Link to Us
Sign In | Join | Other 45 Sites in Network
HomeAnnouncementsWhite Papers
Discussion GroupsFirst AidDatabasesJavaBeansGUIJava 3DVirtual MachineCORBASecurityToolsGeneral
Java DirectoryOpen Source ProjectsSample Book ChaptersUser GroupsWeb Resources
Related Topics
Databases.NETMore Topics ...

Java Forum / Databases / May 2007

Tip: Looking for answers? Try searching our database.

How to tell the HOST and PORT of oracle DB through SID?

Thread view: 
jacksu - 14 May 2007 22:46 GMT
I have one JDBC connection, which works with one particular SID

jdbc:oracle:oci8:@MYSID

I need to find out what's the host and the port of that instance,
because I have to use Thin JDBC, which requires hostname and port.

That MYSID is not on local host 1521.

I am kind of confused how does Oracle JDBC find out where to connect
just through the SID.

Thanks in adavnce.

-- Jack
jacksu - 14 May 2007 22:50 GMT
> I have one JDBC connection, which works with one particular SID
>
[quoted text clipped - 11 lines]
>
> -- Jack

BTW, that SID is not in any of the tnsnames.org file....
Richard Senior - 15 May 2007 11:46 GMT
>> I have one JDBC connection, which works with one particular SID
>>
[quoted text clipped - 9 lines]
>
> BTW, that SID is not in any of the tnsnames.org file....

How about looking at listener.ora on the database server?

Signature

Regards,

Richard

jacksu - 15 May 2007 13:08 GMT
On May 15, 6:46 am, Richard Senior <nos...@r-senior.demon.co.uk>
wrote:
> >> I have one JDBC connection, which works with one particular SID
>
[quoted text clipped - 16 lines]
>
> Richard

I don't know where is the server, and that's what I am trying to find
out..... I just have the SID name, and I am able to connect to the
server from client machine. Thanks.
joeNOSPAM@BEA.com - 15 May 2007 15:59 GMT
> BTW, that SID is not in any of the tnsnames.org file....

The file you want is tnsnames.ora. What is your ORACLE_HOME
environment variable set to? Oracle clients can't use your SID
to connect without finding it's host and port in the tnsnames.ora
file, so the info you want *is* in a file somewhere on your box.
Joe Weinstein at BEA Systems
Richard Senior - 15 May 2007 16:59 GMT
> Oracle clients can't use your SID
> to connect without finding it's host and port in the tnsnames.ora
> file, so the info you want *is* in a file somewhere on your box.

Unless it's using Host Naming or Oracle Names, in which case it wouldn't
necessarily be in the tnsnames.ora on the client.

Signature

Regards,

Richard



Free Magazines

Get these publications absolutely FREE for up to 12 months. There are no hidden fees and no obligation. Simply choose a title, complete the application form and submit it. Read more ...

Oracle MagazineNetwork ComputingComputer WorldBio-IT WorldeWeekInformation WeekInfosecurity
 
Sign In
Join
My Latest Posts
My Monitored Threads
My Blog
My Photo Gallery
My Profile
My Homepage

Start New Thread
Enable EMail Alerts
Rate this Thread



©2008 Advenet LLC   Privacy Policy - Terms of Use
This website includes both content owned or controlled by Advenet as well as content owned or controlled by third parties.