If this is your first visit, be sure to
check out the FAQ by clicking the
link above. You may have to register
before you can post: click the register link above to proceed. To start viewing messages,
select the forum that you want to visit from the selection below.

How can I test the connections between a JDBC thin client and database?

Is there a simple test to test the connections between a JDBC thin client to the database (on a database server). Because there is no Oracle Client on the Client PC, I can't use tnsping or sqlplus to test the connection. How to I test this connection? Thanks

// Connect to the database
// You must put a database name after the @ sign in the connection URL.
// You can use either the fully specified SQL*net syntax or a short cut
// syntax as ::. The example uses the short cut syntax.
Connection conn =
DriverManager.getConnection ("jdbc:oracle:thin:@dlsun511:1721:dbms733",
"scott", "tiger");

Thanks for this info. We have something similar to this, but if the connection fails to the database it just errors with:
Cannot connect to DBstore ("jdbcracle:thin:@dlsun511:1721:dbms733",
"scott", "tiger");

We wanted a test to give a error like an ORA or TNS error number. Or something like tnsping or sqlplus. We wanted to do this test without loading Oracle Client. Is this the only solution?