Upgrading a Third-party JDBC Driver Using the CLI
This section is an update to the topic Upgrading a Third-party JDBC Driver Using the CLI in TIBCO ActiveMatrix Service Grid Administration Guide.
The
updateJDBCDriver
CLI action was previously done for all nodes in the enterprise. For large number of nodes, this takes long time to complete action for all nodes. Starting with TIBCO ActiveMatrix Hotfix 05,
updateJDBCDriver
action can be performed for selected hosts or environments in an enterprise. In the
updateJDBCDriver
target, you can specify a list of hosts or environments to update the JDBC drivers for nodes in the specified hosts or environments. You can specify either host or environment in options, you cannot specify both options at single time. In this feature, the
updateJDBCDriver
action is performed for specific number of threads at single time to complete the JDBC driver update. This helps to solve database concurrency issue.
Sample <CONFIG_HOME>\admin\amxadmin\samples\enterprise_build.xml:
<target name="updateJDBCDriver"> <AMXAdminTask action="updateJDBCDriver" objectSelector="Enterprise" remote="true" propsFile="${instanceProperties} dataFile="${dataFile}" failOnError="false" force="true" options="host={host1,host2,host3,host4,host5,host6}"/> </target>
<OldFeature>
must be specified before
<NewFeature>
, otherwise, the scripts fail.
Parameters
Starting with TIBCO ActiveMatrix Hotfix 05, following new parameters are provided for
updateJDBCDriver
target:
Attribute | Type | Required? | Description |
---|---|---|---|
options | String | No | The valid options are:
|
force | Boolean | No | If force is set as true, it will enable new version even if the old version is not enabled.
If force option is not set, it skips enabling new version on the node if old version is not enabled on node. Example:
Default: The
|
Sample Output
The following is a sample output of the
updateJDBCDriver
target:
>ant -f enterprise_build.xml updateJDBCDriver Buildfile: C:\tibco\v87testInst\data\admin\amxadmin\samples\enterprise_build.xml updateJDBCDriver: [AMXAdminTask] 07 Oct 2021 10:04:05 INFO - Initializing JSSE's crypto provider class com.sun.net.ssl.internal.ssl.Provider in default mode [AMXAdminTask] 07 Oct 2021 10:04:05 INFO - Connecting to AMX Admin server at 'http://na2devasgksh02:8120' as user 'root'. [AMXAdminTask] 07 Oct 2021 10:04:05 INFO - Executing action 'updateJDBCDriver' for 1 objects from data file 'C:\tibco\v87testInst\data\admin\amxadmin\samples\enterprise_data.xml' [AMXAdminTask] 07 Oct 2021 10:04:07 INFO - TIBCO-AMX-CLI-000962: Getting entrprise information before executing action 'updateJDBCDriver' [...] [AMXAdminTask] 07 Oct 2021 10:05:29 INFO - Starting JDBC driver update for Node: 'env2:node11' [AMXAdminTask] 07 Oct 2021 10:04:44 INFO - . [AMXAdminTask] 07 Oct 2021 10:04:42 INFO - . [AMXAdminTask] 07 Oct 2021 10:04:42 INFO - . [AMXAdminTask] 07 Oct 2021 10:04:41 INFO - . [AMXAdminTask] 07 Oct 2021 10:05:30 INFO - Completed JDBC driver update action for Node: 'env2:node8', action completed for '6' out of '19' nodes. [AMXAdminTask] 07 Oct 2021 10:05:30 INFO - Completed JDBC driver update action for Node: 'env4:node401', action completed for '7' out of '19' nodes. [AMXAdminTask] 07 Oct 2021 10:05:30 INFO - Completed JDBC driver update action for Node: 'env2:node9', action completed for '9' out of '19' nodes. [AMXAdminTask] 07 Oct 2021 10:05:30 INFO - Completed JDBC driver update action for Node: 'env2:node10', action completed for '8' out of '19' nodes. [...]
After completing the
updateJDBCDriver
action, nodes for which action is completed are displayed in the output.
[AMXAdminTask] 07 Oct 2021 10:08:18 INFO - -------------------------JDBC driver update is successfully done for below nodes------------------------------ [AMXAdminTask] 07 Oct 2021 10:08:18 INFO - [AMXAdminTask] 07 Oct 2021 10:08:18 INFO - env3:node18, env3:node17, env2:node8, env4:node401, env2:node10 [AMXAdminTask] 07 Oct 2021 10:08:18 INFO - env2:node9, env2:node11, env2:node12, env3:node13, env1:node2 [AMXAdminTask] 07 Oct 2021 10:08:18 INFO - env1:node4, env2:node7 [AMXAdminTask] 07 Oct 2021 10:08:18 INFO - [AMXAdminTask] 07 Oct 2021 10:08:18 INFO - -------------------------JDBC driver update interrupted due to timeout for below nodes------------------------------ [AMXAdminTask] 07 Oct 2021 10:08:18 INFO - [AMXAdminTask] 07 Oct 2021 10:08:18 INFO - env1:node6, env1:node3, env1:node5, env1:node1 [AMXAdminTask] 07 Oct 2021 10:08:18 INFO - [AMXAdminTask] 07 Oct 2021 10:08:19 INFO - ################################################################# root_JDBCDriverUpdate_20211007100408 ################################################################# [AMXAdminTask] 07 Oct 2021 10:08:19 INFO - [AMXAdminTask] 07 Oct 2021 10:08:19 INFO - Publishing DBC Driver Update report to the [XML format] file: C:\reports\JDBCDriverUpdateReport_root_JDBCDriverUpdate_20211007100408.xml [AMXAdminTask] 07 Oct 2021 10:08:20 INFO - JDBC Driver Update report file was created successfully. [AMXAdminTask] 07 Oct 2021 10:08:22 INFO - Publishing JDBC Driver Update report to the [JSON format] file: C:\reports\JDBCDriverUpdateReport_root_JDBCDriverUpdate_20211007100408.json [AMXAdminTask] 07 Oct 2021 10:08:22 INFO - JDBC Driver Updatereport file was created successfully. [AMXAdminTask] 07 Oct 2021 10:08:22 INFO - Action finished at 10/7/21 10:08 AM in 255.9 seconds BUILD SUCCESSFUL Total time: 4 minutes 22 seconds