aspose file tools
The moose likes JDBC and Relational Databases 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 Head First Android this week in the Android forum!
JavaRanch » Java Forums » Databases » JDBC and Relational Databases
Bookmark "Oracle JDBC driver & dbURL" Watch "Oracle JDBC driver & dbURL" New topic

Oracle JDBC driver & dbURL

Ma Di

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.
Ma Di
ram menon

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.
where <database> is either an entry in tnsnames.ora or a SQL*net
name-value pair.
Hope this helps,
Ma Di

Joined: Nov 28, 2000
Posts: 6
Thanks a lot. Ram.
Ma Di
I agree. Here's the link:
subject: Oracle JDBC driver & dbURL
It's not a secret anymore!