DB2 Version 9.7 for Linux, UNIX, and Windows
After you install a DB2 Server product > Verifying your installation >

Verifying the installation using the command line processor (CLP)

You can verify the installation by creating the SAMPLE database and running SQL commands to retrieve sample data.

Prerequisites

To verify the installation:

  1. Log on to the system as a user with SYSADM authority.
  2. Start the database manager by entering the db2start command.
  3. Enter the db2sampl command to create the SAMPLE database.

    This command can take a few minutes to process. There is no completion message; when the command prompt returns, the process is complete.

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

  4. Connect to the SAMPLE database, retrieve a list of all the employees that work in department 20, and reset the database connection. Enter the following commands from the command line processor (CLP):
       connect to sample
       "select * from staff where dept = 20"
       connect reset
    The output should be similar to the following:
    ID   NAME      DEPT   JOB   YEARS  SALARY    COMM
    ---- --------- ------ ----- ------ --------  ---------
      10 Sanders       20 Mgr        7  98357.50        -
      20 Pernal        20 Sales      8  78171.25   612.45
      80 James         20 Clerk      -  43504.60   128.20
     190 Sneider       20 Clerk      8  34252.75   126.50
    
      4 record(s) selected.

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 | Contents ]