IBM DB2

3 minute readExtensibilityDeveloper productivity

IBM DB2 is the database of choice for enterprise-wide solutions. Optimized to deliver industry-leading performance while lowering costs, IBM DB2 offers extreme performance, flexibility, scalability and reliability for any size organization.

The DB2 plugin for CloudBees CD/RO allows you to drive the deployment of DB2 database components as part of multi-tier web application releases.  Using the integration, you can run any SQL commands to perform database deployment and management tasks such as creating, dropping or backing up tables, or updating schema and content.

Plugin Version 1.0.3 Revised on January 23, 2019

Integrated versions

This plugin was developed and tested against following IBM DB2 server:

  • IBM DB2 V11.1

List of supported platforms:

  • Linux

  • IBM AIX

  • IBM zOS

  • Windows

Plugin prerequisites

  • The JDBC Driver jar for IBM DB2 should be copied to the ElectricFlow agent Machine.

  • In addition, if the database on which DB2 is installed is zOS the license jar required to connect to IBM DB2 should be copied to the ElectricFlow agent machine. Refer to IBM documentation for more details on using the right license.

This plugin was tested with db2jcc_license_cisuz.jar.

Setting up the plugin configuration

Plugin configurations are sets of parameters that apply across some or all of the plugin procedures. They reduce repetition of common values, create predefined sets of parameters for end users, and store credentials securely. Each configuration has a unique name that is automatically entered in designated parameters in the procedures.

Input

  1. In the Main Menu, click Admin Plugins to open the Plugin Manager.

  2. Find the EC-DB2 row.

  3. Click Configure to open the DB2 Configurations page.

    .Click *Create Configuration*.
    .To create a DB2 configuration, enter the following information and click *OK*. Remember that you may need to create additional configurations later.
    ParameterDescription

    Configuration Name

    Name of the plugin configuration.

    Description

    Description for the plugin configuration.

    DB2 server address

    Address of DB2 server. Example: db2-local

    DB2 server port

    Port of DB2 server. By default 50000.

    Database name

    Name of DB2 database to connect.

    Driver path

    Absolute path to the DB2 jdbc driver jar. For example /opt/ibm/drivers/db2jcc.jar

    License path

    Refer to the pre-requisites section to determine if this license is required. Absolute path to the DB2 jdbc license jar. For example /opt/ibm/licenses/db2jcc_license_cisuz.jar

    Credential

    • User Name: Enter the name of the IBM DB2 user.

    • Password: Enter the password for the IBM DB2 user name.

    • Retype Password: Re-enter the password for the IBM DB2 user name.

Output

The DB2 Configurations page now shows the new configuration.

You can also manage your DB2 configurations in this page. Click Edit to modify an existing configuration or Delete to remove an existing configuration.

Plugin procedures

ExecuteSQL

This procedure executes SQL query against IBM DB2 server.

Input

  1. In the Main Menu, click Admin Plugins to open the Plugin Manager.

  2. Go to the EC-DB2 plugin.

  3. Go to the ExecuteSQL procedure.

  4. Enter the following parameters:

ParameterDescription

Configuration name

Name of the configuration to be used. URL and credentials are retrieved from the given configuration. A Configuration defines connection details and can be created by going to plugin configuration page.

SQL statement

SQL query to execute.

Path to SQL file

Path to file that contains SQL request.

Output properties path

Path for result properties. If query is select, all information will be stored as JSON array, otherwise affected rows count will be stored as JSON object.

To do an insert

Output:

After the job runs, you can view the results on the Job Details page in CloudBees CD. The status of the page was checked successfully.

In the ExecuteSQL step, click the Log button to see the diagnostic information.

To do a select

Output:

After the job runs, you can view the results on the Job Details page in ElectricFlow. The status of the page was checked successfully.

In the ExecuteSQL step, click the Log button to see the diagnostic information.

Release notes

EC-DB2 1.0.3

  • The documentation has been migrated to the main documentation site.

EC-DB2 1.0.2

  • The plugin icon has been updated.

EC-DB2 1.0.1

  • Fixed non-ascii characters in help.

EC-DB2 1.0.0

  • Initial plugin release with following procedures:

    • ExecuteSQL.