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 verify the installation, if you installed First Steps, perform the following steps:

step  1.

Log on to the system with the user account that you created to verify the installation.

step  2.

Start First Steps. For more information, see Starting First Steps.

step  3.

Click on the Create the SAMPLE Database graphic button on the main panel of First Steps.

This command may take a few minutes to process. For a detailed description of the contents of the SAMPLE database, refer to the Administration Guide. When the SAMPLE database has been created, you will receive a completion message. Click on OK.

step  4.

Once the database is created, click on the View the SAMPLE database graphic button to select data from the SAMPLE database. This action launches the Command Center. The Command Center allows you to use a supplied script to view data from the database. Click on the Execution icon (the gears icon in the top left corner of the screen) to begin the query.

step  5.

Click on the Work with the SAMPLE Database graphic button to start the Control Center. The Control Center allows you to perform administration tasks on different instance and database objects. For more information, see Administering Instances and Databases with the DB2 Administration Tools.

If you did not install the DB2 tools, you can verify the installation by creating the SAMPLE database and connecting to it using the command line processor as follows:

step  1.

Log on to the system with the DB2 user account that you created to verify the installation.

step  2.

Enter the db2sampl command to create the SAMPLE database.

By default, the SAMPLE database will be created on the drive where DB2 was installed; however, you can specify a drive on which to create this database. For example, to create the SAMPLE database on the F: drive, enter the following command:

   db2sampl F:

This command may 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 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:

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