Chapter 2. Installation and configuration 29
The database objects created
During the installation, the following database objects are created:
The DB2 Administration Server (DAS)
The user who runs DAS is dasusr1 and its group is dasadm1.
A DB2 instance db2inst1
The instance owner user is db2inst1 and its group is db2grp1. The instance
directory is /home/db2inst1.
A user db2fenc1
This user runs fenced UDFs or stored procedures. Its group db2fgrp1 is also
created.
We will use some of these objects and names on the sample programs illustrated
in Chapter 3, “Connectivity with DB2 UDB for iSeries” on page 35.
2.3 Create and test the sample database
The DB2 product has now been installed. The next task is creating the database.
This section describes the process of creating and testing the sample database.
2.3.1 Create the db2 sample database
After the installation is complete, you can run launch the DB2 First Steps (db2fs)
tool which provides the first-step-guide of DB2 UDB. We create a DB2 sample
database using db2fs and then test that it works successfully. The sample
database is used by the sample programs throughout this book.
1. The easiest way to start db2fs is to launch it from the vnc client of the user
db2inst1 (the instance owner).
30 DB2 UDB for Linux on iSeries: Implementation Guide
Figure 2-25 Start the vnc server as the instance owner
After switching the user to db2inst1, start the vncserver as illustrated in
Figure 2-25. The desktop number is 2 in this example.
2. After connecting to the db2int1’s desktop from a client, type db2fs from a
xterm window. Then the db2cc main window appears as illustrated in
Figure 2-26. To create the sample database, click Create Sample Database.
linux02:~ # su - db2inst1
db2inst1@linux02:~> vncserver
You will require a password to access your desktops.
Password:
Verify:
New 'X' desktop is linux02:2
Creating default startup script /home/db2inst1/.vnc/xstartup
Starting applications specified in /home/db2inst1/.vnc/xstartup
Log file is /home/db2inst1/.vnc/linux02:6.log
db2inst1@linux02:~> logout
linux02:~ #
32 DB2 UDB for Linux on iSeries: Implementation Guide
Figure 2-27 DB2 sample database creation
4. After a short time, the sample database will be created. During the creation,
this window appears, as in Figure 2-28.
Figure 2-28 Creating the sample database
This step takes a few minutes depending on the processing power. It took 10
minutes, in our case; the Linux partition has 0.5 processor and the host partition
has 0.5 processor.
Get DB2 for Linux on iSeries: Implementation Guide now with the O’Reilly learning platform.
O’Reilly members experience books, live events, courses curated by job role, and more from O’Reilly and nearly 200 top publishers.