Win a copy of Programmer's Guide to Java SE 8 Oracle Certified Associate (OCA) this week in the OCAJP forum!
  • Post Reply
  • Bookmark Topic Watch Topic
  • New Topic

Oracle 8I and JDBC

 
Anonymous
Ranch Hand
Posts: 18944
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
I recently installed Oracle 8i with all the standard defaults. I created a database with the name local2.db, which gave me a SID of local2. When I start it up it starts as LOCAL2.
When trying to connect to it from Java, what should the values of driver and url be set to? I'm on the local machine.
Thanks.
String driver, url;
driver = ?;
url = ?;
Class.forName(driver);
Connection conn = DriverManager.getConnection (url ,"account","password");

[This message has been edited by Chris Thibault (edited March 12, 2001).]
[This message has been edited by Chris Thibault (edited March 12, 2001).]
 
Thomas Paul
mister krabs
Ranch Hand
Posts: 13974
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
From http://technet.oracle.com
DriverManager.getConnection("jdbc racle:thin:@<mc-name>:<port-no>:<sid>","scott", "tiger");
where mc-name is the machine name
 
  • Post Reply
  • Bookmark Topic Watch Topic
  • New Topic