frnds wen we connect with Oracle server from java,we use
getConnection(oracledriver,IPadress of
server,servername,username ,password);
forgive me if they r not in the same order.now my question is wat is
the server name if we use same system for server as well as
client.Ofcourse the IP address is loop back address.
Thanks in Advance.
Srinivas Reddy Thatiparthy.
Manish Pandit - 27 Dec 2007 23:15 GMT
> frnds wen we connect with Oracle server from java,we use
> getConnection(oracledriver,IPadress of
[quoted text clipped - 5 lines]
> Thanks in Advance.
> Srinivas Reddy Thatiparthy.
I think you are confusing service name with server name. First off I
could not locate a getConnection( ) that takes a driver. However, what
the DriverManager API's getConnection() needs is a connection string,
user ID and a password. Connection String is dependent on the driver
type, server IP, port and the service name. For example:
jdbc:oracle:thin:scott/tiger@//localhost:1521/testdb. In this string,
thin driver is used with scott/tiger as userID/password on oracle
server running on port 1521 on localhost, with the service name
testdb.
Hope this helps.
-cheers,
Manish