aspose file tools*
The moose likes JDBC and the fly likes Oracle JDBC driver & dbURL Big Moose Saloon
  Search | Java FAQ | Recent Topics | Flagged Topics | Hot Topics | Zero Replies
Register / Login


Win a copy of Java 8 in Action this week in the Java 8 forum!
JavaRanch » Java Forums » Databases » JDBC
Bookmark "Oracle JDBC driver & dbURL" Watch "Oracle JDBC driver & dbURL" New topic
Author

Oracle JDBC driver & dbURL

Ma Di
Greenhorn

Joined: Nov 28, 2000
Posts: 6
I use Oracle in UNIX environment. I know the information of
dbhost, port and service-name.
However I can't use the form of "jdbc racle:thin:@dbhost ort:sid"
because I don't have a "sid". Can you tell me how to connect DB
in such a situation?
By the way, could there anyone tell me where to find the format of dbURl passed to DriverManager.getConnection(dbURL) as I saw
different DB use different dbURL format.
Thanks a lot.
Rgds,
Ma Di
ram menon
Greenhorn

Joined: Oct 24, 2000
Posts: 5
Every Oracle installation will have an SID. By default it is ORCL. But you can change this during installation.
You can use the OCI driver if you do not know the SID.
jdbcracleci8:@<database>
where <database> is either an entry in tnsnames.ora or a SQL*net
name-value pair.
Hope this helps,
Ram
Ma Di
Greenhorn

Joined: Nov 28, 2000
Posts: 6
Thanks a lot. Ram.
Rgds,
Ma Di
 
It is sorta covered in the JavaRanch Style Guide.
 
subject: Oracle JDBC driver & dbURL
 
Similar Threads
UBB Smilies
Doubt on specifying Data source
java.sql.Date
Invalid URL, and I'm not sure why.
JDBC platform independent ?? HOW??