IBM's DB2 database comes in three distinct flavors, namely
- Linux/Unix/Windows - LUW for short
- zOS - DB2 for zSeries - the mainframe version of DB2
- iSeries - DB2 for the AS400 platform and the subsequent RS/6000 based minicomputers
The SQL dialect is mostly the same across all these products, but there are some differences. In particular the data dictionary tables that provide the ability to look up what tables exist, what columns exist in those tables, etc. are often different. The LUW product provides metadata in the SYSCAT schema while the other products use different tables in the SYSIBM schema. IBM provides some packages that replicate SYSCAT on the zOS platform, and possibly the iSeries platform as well. Some features, like automatically generating views or seeing table definitions and indexes in SQL Runner may not work.
Looker needs to use the interface provided by IBM's DB2Connect product. If the JDBC URL you use to connect to other applications to the database starts with
jdbc:db2:... then you should be ok. If you use a different url like
jdbc:as400:... then you are using a package called "jtopen" instead of DB2Connect. You will need to ask your DBAs to install DB2Connect in order to use Looker.
When connecting to DB2 on zOS or on iSeries you generally need to provide a license file. Looker includes the DB2 JDBC driver, but obviously we could not include the license file in the product. If you have this issue, you will generally see a message like this when you attempt to connect:
In order to circumvent this issue, you will need to obtain the DB2 JDBC driver and the associated license file from your DB2 administrator. The DB2 JDBC driver will be named
db2jcc.jar. The license file will be named
db2jcc_license_cisuz.jar. You might have both license files if you are going to connect to both zOS and iSeries DB2 instances in your environment.
Connect to the server hosting your Looker and go to the looker install directory. It is often installed under the user
looker in a directory called
looker. So that directory would be
/home/looker/looker. If looker was installed in a different location, the use that directory. For example,
Create the directory path custom_jdbc_drivers/db2
mkdir -p custom_jdbc_drivers/db2
Copy the JDBC jar file and the license or licenses to that directory.
cp db2jcc.jar db2jcc_license_c*.jar custom_jdbc_drivers/db2/
Create the file
custom_jdbc_config.yml and add the following:
- name: db2
If the file
lookerstart.cfg does not exist, create it and add the line
LOOKERARGS="--use-custom-jdbc-config". If it does exist, add the value
--use-custom-jdbc-config to the settings for
Restart Looker with the command
When Looker restarts, it will load the JDBC driver and license file(s) you provided instead of the driver that comes bundled with Looker.