Db2/LUW – Sample Database

Background

Upon completing the installation of our own DB/2 Instance, it is time to provision a sample database.

Sample Database

db2sampl

IBM bundles a binary for creating a sample database.

The name of the binary is db2sampl.

Windows

Preparation

Thankfully in MS Windows, there is not a lot of preparatory work that needs to occur.

Environment Variables

Her are the environment variables that need to be set:

  1. DB2INSTANCE
Environment Variables – Read
Syntax

set DB2

Output

read_20180910_0346AM

 

Processing

The actual execution is just as straight forward.

Simply execute db2sampl.

Syntax


db2sampl

Output

Here is the output

create_sampl_20180907_0954PM.PNG

Explanation

The SAMPLE database is created as is did not previously exist.

We are currently logged into the OS as DADENIJI.

That account is used in creating a corresponding schema DADENIJI.

Tables are created and records added.

Leave a Reply

Please log in using one of these methods to post your comment:

WordPress.com Logo

You are commenting using your WordPress.com account. Log Out /  Change )

Google+ photo

You are commenting using your Google+ account. Log Out /  Change )

Twitter picture

You are commenting using your Twitter account. Log Out /  Change )

Facebook photo

You are commenting using your Facebook account. Log Out /  Change )

Connecting to %s