Before you begin
Download a copy of the createdbtablesclients.zip file.
This file contains an SQL script that creates and populates the database
tables that are needed in this scenario.
Tip: Depending on the security requirements of your DB2® installation, you might need
additional authorities to create a database. You might also need to
edit the SQL script. Consult your database administrator.
Procedure
Complete the following steps to set up the sample DB2 database configuration that
was used to develop the scenario:
- Create a database named CLIENTS.
- Open a DB2 command
prompt and create the database. Click , and select Command Window. DatabaseInstance is
your DB2 instance name, which
by default is DB2COPY1 (default).
A DB2 - CLP window opens.
- Create the CLIENTS database.
Run the following command: DB2 CREATE DB CLIENTS
You receive the following message: DB20000I
The CREATE DATABASE command completed successfully.
- Test the database connection. Run the following command: DB2
CONNECT TO CLIENTS
- Create the tables by using the SQL createdbtablesclients.sql script
provided in the scenario.
- Extract the file createdbtablesclients.zip.
- From the DB2 command
prompt, run the following command: db2 -vf Sqlscriptdirectory\createdbtablesclients.sql,
where Sqlscriptdirectory\ is the directory where
you extract createdbtablesclients.zip.
Results
You have a database, named CLIENTS, which contains the
database tables and data that you need to complete the scenario.