IBM DB2 on AS400

Stay organized with collections Save and categorize content based on your preferences.

Looker supports IBM's DB2 database on AS400, which is discussed on this IBM Knowledge Center page.

Looker also supports IBM's DB2 for Linux, UNIX, and Windows (LUW), as described on the IBM DB2 for Linux, UNIX, and Windows (LUW) documentation page.

To connect Looker to your IBM DB2 database on AS400, follow the steps on this page.

Installing the AS400 JDBC driver

Download the jt400.jar file from this downloads page. You will need to extract it from jtopen_9_6.zip.

Follow the steps on the Unpackaged JDBC drivers documentation page using the following values:

driver symbol: as400

driver entry:

  - name: as400
    dir_name: as400
    module_path: com.ibm.as400.access.AS400JDBCDriver

For the step to put the driver in your dialect's directory, the path to this file will look like this: looker/custom_jdbc_drivers/as400/jt400.jar

Users and security

Create a user with a secure password to connect to Looker. This user should have read access to all tables to be explored in Looker.

PDTs

Use the following command to create a schema:

CREATE SCHEMA looker_scratch

Give the user that will access Looker write access to the schema.

Query killing

In order to enable query killing, implement the following stored procedure:

CREATE OR REPLACE PROCEDURE LOOKER_CANCEL_ACTIVITY (IN application_handle INTEGER)
  LANGUAGE SQL
BEGIN
  DECLARE UOW_ID INTEGER;
  DECLARE ACTIVITY_ID  INTEGER;

  FOR v AS cur1 CURSOR FOR
    SELECT UOW_ID, ACTIVITY_ID FROM TABLE(SYSPROC.MON_GET_ACTIVITY(application_handle, -1))
  DO
    CALL WLM_CANCEL_ACTIVITY(application_handle, v.uow_id, v.activity_id);
  END FOR ;
END

Feature support

For Looker to support some features, your database dialect must also support them.

In the latest release of Looker, IBM DB2 supports the following Looker features:

Next steps

After completing the database configuration, you can connect to the database from Looker using these directions.