Absent Member.. JasonCantrell Absent Member..
Absent Member..
108 views

[OO Support Tip] How to check Central DB connectivity with command line interface.

Question:

Using Operations Orchestration (OO): How to check Central DB connectivity with command line interface?

 

Solution:

 

The "%ICONCLUDE_HOME%\Central\tools" (Windows) or "$ICONCLUDE_HOME/tools" (Linux) contains TestOracleConnection.jar, TestSqlServerConnection.jar, or TestMysqlConnection.jar which can be used to verify database connectivity.

USAGE (slightly different by database):
[root@oo9x Central-9.00]# $ICONCLUDE_HOME/jre1.6/bin/java -jar $ICONCLUDE_HOME/tools/TestMysqlConnection.jar

========= USAGE: ==========

TestMysqlConnection [host=<host>] [port=<port>] [database=<instance>] user=<user> [password=<password>] [version=<version>] [log=<logfile>] [get_prod_lang=<true|false>]

where:

host          - host name or IP address, defaults to localhost
port          - port number, defaults to 3306
user          - user name
password      - password, defaults to none.
database      - database name, defaults to orchestration
version       - Central version to be checked for
log           - path to a log file
get_prod_lang - returns OO Central language, defaults to false

the program returns:
   - exit code 0 if connection succeeds
   - exit code 1 in case of failure
   - exit code 4 in case login successful, but user does not have sufficient database privileges

 

[root@oo9x Central-9.00]# $ICONCLUDE_HOME/jre1.6/bin/java -jar $ICONCLUDE_HOME/tools/TestOracleConnection.jar

========= USAGE: ==========

TestOracleConnection [host=<host>|nodes=<host:port,host:port,...>] [port=<port>] [database=<instance>] user=<user> [password=<password>] [version=<version>] [log=<logfile>] [get_prod_lang=<true|false>]

or:

TestOracleConnection subscribe_ons nodes=<host:port,host:port,...>


where:

host          - host name or IP address, defaults to localhost
nodes         - RAC nodes as a list of comma-separated host:port pairs
port          - port number, defaults to 1521
user          - user name
password      - password, defaults to none.
database      - Oracle service name, defaults to XE.
version       - OO Central version to be checked for
log           - path to a log file
get_prod_lang - returns OO Central language, defaults to false

subscribe_ons - subscribe to ONS events

the program returns:
   - exit code 0 if connection succeeds
   - exit code 1 in case of connection failure
   - exit code 2 in case of version mismatch
   - exit code 3 in case <database> appears to be a SID, not a service name
   - exit code 4 in case login successful, but user does not have sufficient database privileges
   - exit code -NNN (negative) where NNN is the number found in ORA-NNN error code as returned by the database

for subscribe_ons, program terminates when a shutdown event is received

 

[root@oo9x Central-9.00]# $ICONCLUDE_HOME/jre1.6/bin/java -jar $ICONCLUDE_HOME/tools/TestSqlServerConnection.jar

========= USAGE: ==========

TestSqlServerConnection [host=<host>] [port=<port>] [instance=<instance>] user=<user> [password=<password>] [database=<database>] [domain=<domain>] [ssl=<ssl>] [version=<version>] [log=<logfile>] [get_prod_lang=<true|false>]

where:

host          - host name or IP address, defaults to localhost
port          - port number, defaults to 1433
database      - database name, defaults to dharma
instance      - named instance, defaults to none
user          - user name
password      - password, defaults to none.
domain        - Windows domain, defaults to none (local machine)
ssl           - use SSL, must be one of: off/request/require/authenticate
version       - Central version to be checked for
log           - path to a log file
get_prod_lang - returns OO Central language, defaults to false

the program returns:
   - exit code 0 if connection succeeds and the database version (if specified) matches
   - exit code 1 in case of bad parameters, connection failure or version mismatch
   - exit code 4 in case login successful, but user does not have sufficient database privileges
   - exit code equals to the vendor code for SQL failures

 

Test example:
[root@oo9x Central-9.00]# $ICONCLUDE_HOME/jre1.6/bin/java -jar $ICONCLUDE_HOME/tools/TestMysqlConnection.jar host=oo-mysql database=oo9 user=oo9 password=oo9

========== ATTEMPTING MYSQL LOGIN: ======

host     = oo-mysql
port     = 3306
database = oo9
user     = oo9
password = *****
version  =

==== LOGIN SUCCESSFUL, database time is: 2011-12-08 03:49:02.0
==== PERMISSION TEST SUCCESSFUL


[root@oo9x Central-9.00]# echo $?
0

 

Direct link to the document:

http://support.openview.hp.com/selfsolve/document/KM1300367

HP Support
If you find that this or any post resolves your issue, please be sure to mark it as an accepted solution.
Labels (2)
0 Likes
The opinions expressed above are the personal opinions of the authors, not of Micro Focus. By using this site, you accept the Terms of Use and Rules of Participation. Certain versions of content ("Material") accessible here may contain branding from Hewlett-Packard Company (now HP Inc.) and Hewlett Packard Enterprise Company. As of September 1, 2017, the Material is now offered by Micro Focus, a separately owned and operated company. Any reference to the HP and Hewlett Packard Enterprise/HPE marks is historical in nature, and the HP and Hewlett Packard Enterprise/HPE marks are the property of their respective owners.