IBM Books

Quick Beginnings for DB2 Extended Enterprise Edition 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. For a detailed description of the sample database, refer to the Administration Guide.

The sample database is automatically cataloged with the database alias SAMPLE when it is created. By default, the database is created in the path specified by the DFTDBPATH database manager configuration parameter. You must ensure that this path does not specify an NFS-mounted directory.

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:
    Note:The database partition server from which you issue the db2sampl command becomes the catalog node for the database.
    A database partition is created for the database on every database partition server in the instance.

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

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 ]