IBM Books

Quick Beginnings Personal Edition


Verifying the Installation

You can verify that DB2 is installed correctly by creating the SAMPLE database on your system, and accessing data from the database. To create the SAMPLE database, and access data from it, perform the following steps:

Step  1.

Log on to the system as a user with System Administrative (SYSADM) authority. For more information, see Working with the System Administrative Group.

Step  2.

Enter the db2sampl command to create the SAMPLE database.

The SAMPLE database is automatically catalogued with the database alias SAMPLE when it is created.

Step  3.

Start the database manager by entering the db2start command.

Step  4.

Enter the following commands to connect to the SAMPLE database, retrieve a list of all the employees that work in department 20, and reset the database connection:

   db2 connect to sample
   db2 "select * from staff where dept = 20"
   db2 connect reset

For information about entering DB2 commands, see Entering Commands Using the Command Center or Entering Commands Using the Command Line Processor.

Figure hint not displayed.

After you have verified the installation, you can remove the SAMPLE database to free up disk space. Enter the db2 drop database sample command to drop the SAMPLE database.


[ Top of Page | Previous Page | Next Page | Table of Contents | Index ]

[ DB2 List of Books | Search the DB2 Books ]