Excute setWLSEnv.sh before running this command:
$ java -classpath /home/soa/Oracle/Middleware/wlserver_10.3/server/lib/weblogic.jar utils.dbping ORACLE_THIN db_user db_pwd db_host:db_port:SID
**** Success!!! ****
You can connect to the database in your app using:
java.util.Properties props = new java.util.Properties();
props.put("user", "xxxxx");
props.put("password", "xxxxxx");
java.sql.Driver d =
Class.forName("oracle.jdbc.OracleDriver").newInstance();
java.sql.Connection conn =
Driver.connect("jdbc:oracle:thin:@db_host:db_port:SID", props);
Or use telnet:
telnet db_host db_port