DB2-ZOS-DB connector
Prerequisites
-
Go to {user.home}\.ol\cli\
-
Create the extra-classpath-resources folder in the cli folder.
-
Save the following files in extra-classpath-resources.
- db2jcc_license_cu.jar
- db2jcc4-10.5.jar
- db2jcc_license_cisuz.jar
CLI Commands
ol test connection
[module folder]> ol test connection --url jdbc:db2://192.86.32.238:5035/DALLASB --username demo --password 12345 --query-timeout 3000 --connection-test-query "SELECT * FROM ACCOUNTS WHERE ID='A1000000001'" --pool-max-size 5
[module folder]$ ol test connection --url jdbc:db2://192.86.32.238:5035/DALLASB --username demo --password 12345 --query-timeout 3000 --connection-test-query "SELECT * FROM ACCOUNTS WHERE ID='A1000000001'" --pool-max-size 5
ol add
[module folder]> ol add --executable GET_ACCOUNT_ORDERS --advanced-result-set-query CALL DEMO001.GET_ACCOUNT_ORDERS('A100054321')
[module folder]$ ol add --executable GET_ACCOUNT_ORDERS --advanced-result-set-query CALL DEMO001.GET_ACCOUNT_ORDERS('A100054321')
Properties
--executable (required)
The stored procedure name
--executable GET_ACCOUNT_ORDERS
--advanced-result-set-query
The advanced query for fetching a result set
--advanced-result-set-query CALL DEMO001.GET_ACCOUNT_ORDERS('A100054321')
--url
The JDBC url
--url jdbc:db2://192.86.32.238:5035/DALLASB
--username
The database user
--username demo
--password
The database password
--password 12345
--query-timeout
The query timeout (in milliseconds) of callable statements for stored procedures.
--query-timeout 5000
--connection-test-query
Specific validation query if the driver is not jdbc4 compatible
--connection-test-query "SELECT * FROM ACCOUNTS WHERE ID='A1000000001'"
--pool-max-size
The maximal size of the thread pool
--pool-max-size 5
Updated 4 months ago