Configuring Db2 for Linux, UNIX, and Windows (LUW) as the build metadata database

DBB customers can obtain a Db2 for LUW database if they do not already have a Db2 for z/OS available. See Obtaining a Db2 LUW database.

1. Create a database for the DBB artifacts.

As the database instance user, issue the following command:

db2 create database DBB using codeset UTF-8 territory en PAGESIZE 8192

Note: Db2 requires a PAGESIZE of 8k or larger.

2. Create your database tables by using the supplied scripts.

Refer to the SQL scripts located in the DBB installation on z/OS UNIX, which by default are at /usr/lpp/IBM/dbb/ddl/ for the supported databases to create the schema and tables that are used by DBB to store file metadata. See Clustering indexes for DBB Db2 database tables to explicitly set table index clustering in the SQL scripts.

Modify the schema and database name in the script as necessary. To change the schema name, set one or both schema properties.

  • Copy create_DB2.sql from the z/OS install directory, defaults to /usr/lpp/IBM/dbb/ddl, to the Linux machine.
  • As the database instance user run the following commands to create database tables:
db2 connect to DBB  
db2 -stvf create_DB2.sql
db2 disconnect DBB

The build result attachments, build report, and build report data are stored as BLOBs. The supplied scripts set the BLOB size to 100 M. If you anticipate attaching larger files or have an exceptionally large source code repository, you might want to consider increasing the BLOB size.

If you find that your BLOB size is too small (SQLCODE -302 from INSERT into table ARTIFACT_CONTENT) after installation, you can modify the BLOB definition, for example to 150 M, by using the following command:

alter table ARTIFACT_CONTENT alter column CONTENT_DATA set data type blob(150M)

3. Store your database drivers in an accessible location in z/OS UNIX

Get the driver and the license JAR files from your installation directory of Db2 for LUW and store them into a z/OS UNIX directory that is accessible by the DBB toolkit.

Copy the db2jcc4.jar and db2jcc_license_cu.jar files from your installation directory of Db2. For example, these files are typically located in the /opt/ibm/db2/V<version>/java directory on Linux.