IBM Books

Quick Beginnings for DB2 Universal Database for UNIX


Creating the Sample Database

If you did not create the sample database after installation, you might want to create the sample database, called SAMPLE, that is provided with DB2 Universal Database. It contains tables, views, and fictitious data that you can use to verify that DB2 is correctly installed or test queries or commands. For a detailed description of the sample database, refer to the Administration Guide.

The SAMPLE database requires approximately 15 MB of disk space and by default is created in the instance's home directory. It is automatically cataloged with the database alias SAMPLE when it is created.

To create the sample database, perform the following steps:

  1. Log in as the instance owner.

  2. Run the start up script as follows:
       . INSTHOME/sqllib/db2profile    (for Bourne or Korn shell)
       source INSTHOME/sqllib/db2cshrc (for C shell)
    

    where INSTHOME is the home directory of the instance

  3. Create the sample database by issuing the following command:
       db2sampl
    

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



note

To remove the SAMPLE database, enter the following command as the instance owner in the command line processor:

   drop database sample


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

[ DB2 List of Books | Search the DB2 Books ]