jdbctest.javaTM tool

 

Click the button for information on how to use the tool.

Click the button for the tool's source code.


Purpose:

The jdbctest.java tool is made available to IBM customers and support personnel to assist in debugging setup and install problems with the Advanced Edition of WebSphere Application Server.

Benefits of the tool:

How to use this tool:

The best way to demonstrate the use of this tool is through examples.

Meaning of the text in the following examples:  

NOTE:  WebSphere Application Server must be installed before you can use this tool.

Compiling the tool:
javac jdbctest.java (compiles this tool and produces several class files)

Do you want to invoke the tool with DB2 or Oracle? Choose your database.

Invoking the tool with DB2:
java jdbctest
JDBC Test starting...
Please respond:
        1 - For DB2
        2 - For Oracle
1
Loading jdbc driver: COM.ibm.db2.jdbc.app.DB2Driver
COM.ibm.db2.jdbc.app.DB2Driver was loaded successfully
Please enter connection URL, e.g:
jdbc:db2:dbname or dbname
was
Please enter userid for connection to jdbc:db2:wsa
guest
userid is: 'guest'
Please enter password    =====>  WARNING: PASSWORD NOT HIDDEN   <======
enter 'gui' instead of your password for a secure GUI prompt)  (if you enter the literal characters "gui" you get a graphical password prompt)
guest
Connection Successful: COM.ibm.db2.jdbc.app.DB2Connection@201c70f
Connection took 120 milliseconds to complete (time it took to perform the database connect)
AutoCommit is: true
Create new statement...
Please enter sql statement to execute...(q to quit)...(or maxconn to test maximum connections possible to database)
select * from ejsadmin.node_table
Operation took 2 milliseconds to complete
Just tried true = stmt.execute("select * from ejsadmin.node_table");  (true means that there additional results to extract)
Getting result set...
4 column(s) in result
INSTANCE_ID   TYPE_ID   NAME   DEPLOYEDJARDIR
-----------------------------------
48,12,asdasd,e:\wsa\deployedEJBs
161,12,hany,/usr/WebSphere/AppServer/deployedEJBs

Create new statement...
Please enter sql statement to execute...(q to quit)...(or maxconn to test maximum connections possible to database)
q
Ok, quitting!
 

Invoking the tool with Oracle:
java jdbctest
JDBC Test starting...
Please respond:
        1 - For DB2
        2 - For Oracle
2
Loading jdbc driver: oracle.jdbc.driver.OracleDriver
oracle.jdbc.driver.OracleDriver was loaded successfully
Please enter connection URL, e.g:
jdbc:oracle:thin:@hostname:1521:dbname or thin:@hostname:1521:dbname
thin:@pig:1521:orcl
Please enter userid for connection to jdbc:oracle:thin:@pig:1521:orcl
hany
userid is: 'hany'
Please enter password    =====>  WARNING: PASSWORD NOT HIDDEN   <======
enter 'gui' instead of your password for a secure GUI prompt)  (if you enter the literal characters "gui" you get a graphical password prompt)
hany
Connection Successful: oracle.jdbc.driver.OracleConnection@201c665
Connection took 1462 milliseconds to complete (time it took to perform the database connect)
AutoCommit is: true
Create new statement...
Please enter sql statement to execute...(q to quit)...(or maxconn to test maximum connections possible to database)
select * from person
Operation took 20 milliseconds to complete
Just tried true = stmt.execute("select * from person"); (true means that there additional results to extract)
Getting result set...
3 column(s) in result
ID   NAME   AGE
-----------------------------------
1,Hany Salem,77
22,Barton,55

Create new statement...
Please enter sql statement to execute...(q to quit)...(or maxconn to test maximum connections possible to database)
q
Ok, quitting!