The Artima Developer Community
Sponsored Link

Legacy Java Answers Forum
February 2001

Advertisement

Advertisement

This page contains an archived post to the Java Answers Forum made prior to February 25, 2002. If you wish to participate in discussions, please visit the new Artima Forums.

Message:

server and SID

Posted by Henry Minsky on February 12, 2001 at 8:45 PM

>
> I want to make a Database Connection to Personal oracle 8 using thin driver classes12.zip I am using windows98 and personal oracle 8. I have set my autoexec.bat file properly.I am told I will have to use the foll syntax

> Class.forName("oracle.jdbc.driver.OracleDriver");

> conn=DriverManager.getConnection
> ("jdbc:oracle:thin:@Servername:1528:ora8);

> Now instead of servername what do I put since I am not working on a server I am working on a stand alone machine(win98) and instead of ora8 which I am told is the SID what do I put in since I havent made a SID. It the SID necessary ?

>
>


If you have a database installed and running, then it does
have a SID. You just need to find it. I only use Oracle on
Unix so I don't know where environment vars etc
are stored on a Windows box. You should be able to specify
a hostname of "localhost", or 127.0.0.1, check your windows
HOSTS file to make sure localhost is defined. your machine
does have an IP address, and may have a hostname as well, or
you can give it a hostname in the hosts file, which will
be sufficient for local use.





Replies:

Sponsored Links



Google
  Web Artima.com   
Copyright © 1996-2009 Artima, Inc. All Rights Reserved. - Privacy Policy - Terms of Use - Advertise with Us