DBPing Utility In Weblogic Server
DBPing Utility In Weblogic Server,
The dbping command-line utility tests the connection between a DBMS and your client machine via a JDBC driver.
Syntax
$ java utils.dbping ORACLE_THIN USERNAME PASSWORD IP:PORT:SID
Example
[oracle@oracle ~]$ bin
[oracle@oracle bin]$ pwd
/<user_projects>/domains/basedomain/bin
[oracle@oracle bin]$ ll
total 2.1M
drwxr-x— 2 oracle oracle 1.0K Jul 20 02:17 nodemanager
drwxr-x— 2 oracle oracle 80 Jul 20 02:17 server_migration
drwxr-x— 2 oracle oracle 80 Jul 20 02:17 service_migration
-rwxr-x— 1 oracle oracle 2.0K Jul 20 02:17 secureWebLogic.sh
-rwxr-x— 1 oracle oracle 2.0K Jul 20 02:17 stopWebLogic.sh
-rwxr-x— 1 oracle oracle 3.2K Jul 20 02:17 startManagedWebLogic.sh
-rwxr-x— 1 oracle oracle 2.4K Jul 20 02:17 stopManagedWebLogic.sh
-rwxr-x— 1 oracle oracle 17K Jul 20 02:17 setDomainEnv.sh
-rwxr-x— 1 oracle oracle 5.7K Jul 20 02:17 startWebLogic.sh
-rw——- 1 oracle oracle 686K Aug 7 02:25 nohup.out
[oracle@oracle bin]$ . ./setDomainEnv.sh
[oracle@oracle basedomain]$ java utils.dbping ORACLE_THIN PRD_IPM PRD_IPM <DB IP>:1521/xe
OUTPUT
**** Success!!! ****
You can connect to the database in your app using:
java.util.Properties props = new java.util.Properties();
props.put(“user”, “PRD_IPM”);
props.put(“password”, “PRD_IPM”);
java.sql.Driver d =
Class.forName(“oracle.jdbc.OracleDriver”).newInstance();
java.sql.Connection conn =
Driver.connect(“jdbc:oracle:thin:@<DB IP>:1521/xe”, props);
