Preparing your external DB2 database

Prepare your external DB2 database by using the provided the database preparation scripts to help you streamline the process.

Before you begin

Download the database preparation scripts.

About this task

For more information about preparing your DB2 database for installation, see:

Procedure

  1. Install your DB2 database by using the provider's documentation.
  2. Configure the DB2 instance by creating and running the following script as the instance owner, for example db2inst1:
    
    ./db2configinst.sh <instance_name> <port> <db2_installation_directory>
    
    For example:
    
    ./db2configinst.sh db2inst1 50000 /home/db2inst1/sqllib
    
  3. Create the DB2 database by creating and running the following script as the instance owner:
    
    ./db2createdb.sh <db_name> <instance_name> US <db2_installation_directory> <linux_user_who_owns_db>
    
    For example:
    
    ./db2createdb.sh tasdb db2inst1 US /home/db2inst1/sqllib tririga
    
  4. Connect to the DB2 database by creating and running the following script as the instance owner:
    db2 connect to $DB_NAME

    Ensure that you replace $DB_NAME with the required value.

  5. Create the DB2 tablespace instance by creating and running the following script as the instance owner:
    
    db2 -tvf create-ts.sql
    

    Ensure that you replace $DB_NAME$ and $DB_USERNAME$ with the required values.

  6. Set up SSL and extract the certificate by creating and running the following script as the instance owner:
    
    ./ssl-setup.sh <instance_name>