File APIs for Java Developers
Manipulate DOC, XLS, PPT, PDF and many others from your application.
The moose likes JDBC and Relational Databases and the fly likes Oracle 8I and JDBC 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 "Oracle 8I and JDBC" Watch "Oracle 8I and JDBC" New topic

Oracle 8I and JDBC

Ranch Hand

Joined: Nov 22, 2008
Posts: 18944
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.
String driver, url;
driver = ?;
url = ?;
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

Joined: May 05, 2000
Posts: 13974
DriverManager.getConnection("jdbc racle:thin:@<mc-name>:<port-no>:<sid>","scott", "tiger");
where mc-name is the machine name

Associate Instructor - Hofstra University
Amazon Top 750 reviewer - Blog - Unresolved References - Book Review Blog
I agree. Here's the link:
subject: Oracle 8I and JDBC
It's not a secret anymore!