HCL Workload Automation, Version 9.4

Creating datasource

Create datasource.

Procedure

  1. Edit the TDWCDatasource.properties file to insert the correct values for the connection parameters to the created database. TDWCDatasource.properties is located in: TWA_home\wastools. See the following sample for your reference:
    #################################
    # Datasource properties template
    #################################
    
    # Host name of the server on which the DB2 is installed
    databaseServerName=localhost
    
    # Port used by DB2
    databasePort=50000
    
    # Name of the database to use (must exist)
    databaseName=TDWC
    
    # If true, when a JDBC provider with provided name is found in the 
    #configuration, it is deleted and re-created.
    # type in “true” just the first time you create the datasource
    deleteAndRecreate=false
    
    
    #################################
    # Optional properties
    #################################
    
    # Use SSL connection (FIPS mode). If true, secure connection socket is 
    #used to communicate with DB2 (default false)
    #useSslConnection=false
    
    # JNDI name to associate with datasource (to be specified in the DWC 
    #configuration) datasourceJndiName=jdbc/TDWC
    
    # Name of the WebSphere JBDC provider to create
    #providerName=tdwcDriver
    
    # Name of the datasource to create
    #datasourceName=tdwcDatasource
    
    # Name of the WebSphere node on which is running the DWC.
    #nodeName=TIPNode
    
    
    #################################
    # Connection pool properties 
    #
    # These properties are optional.
    # 
    # Look at "connection pool" settings on WAS infocenter for more info
    # http://publib.boulder.ibm.com/infocenter/wasinfo/v7r0/index.jsp?topic=/
    #com.ibm.webSphere.express.doc/info/exp/ae/udat_conpoolset.html
    #################################
    
    #connectionTimeout = 180
    #maxConnections = 20
    #minConnections=1
    #reapTime=180
    #unusedTimeout=1800
    #agedTimeout=0
    #purgePolicy=EntirePool
  2. From the command line interface, go to {TWA_HOME}\wastools directory, and run the following command to create a datasource:
    • On Windows systems
      installTDWCDataSource.bat TDWCDatasource.properties
    • On UNIX systems
      ./installTDWCDataSource.sh TDWCDatasource.properties
  3. Check that you have the JDBC driver for DB2 on the computer where the Dynamic Workload Console is installed. The JDBC driver must be available at: JazzSM install_dir/lib/db2.
  4. Create the ${DB2UNIVERSAL_JDBC_DRIVER_PATH} variable in the WebSphere Application Server administrative console:
    • From the WebSphere Application Server console, expand Environment and select WebSphere variables.
    • Click the DB2UNIVERSAL_JDBC_DRIVER_PATH variable from the list of variables in the right pane to edit the value.
    • On the Configuration page, enter the path to the directory that contains the DB2 Universal JDBC Driver in the Value field.
    • Click OK to save the changes.
  5. When creating the new JDBC provider:
    • Create the JDBC provider and data source in the server scope where Dashboard Application Services Hub is deployed, for example, cells:JazzSMCell:nodes:JazzSMNode:servers:server1.
    • Select DB2 as the database type.
    • Select DB2 Universal JDBC Driver Provider as the provider type.
    • Select Connection pool data source as the implementation type.
    • In Step 2: Enter database class path information, provide the directory location for DB2 JAR archive files. For example:
      Class path:
       ${DB2UNIVERSAL_JDBC_DRIVER_PATH}/db2jcc.jar
       ${UNIVERSAL_JDBC_DRIVER_PATH}/db2jcc_license_cu.jar 
      Example of a directory location for WebSphere Application Server ${DB2UNIVERSAL_JDBC_DRIVER_PATH} variable: C:\IBM\JazzSM\lib\db2
  6. Restart WebSphere Application Server.

What to do next

Because the TDWCDatasource.properties file is a local file, you must edit it and run the above steps on all Dynamic Workload Console instances.