wats the clue  
Author Message
Sreenivas





PostPosted: 2007-12-27 14:42:00 Top

java-programmer, wats the clue 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





PostPosted: 2007-12-28 7:15:00 Top

java-programmer >> wats the clue On Dec 26, 10:42 pm, Sreenivas <email***@***.com> wrote:
> 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.

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