IBM Books

Command Reference

db2sampl - Create Sample Database

Creates a sample database named SAMPLE. For more information about this database, see the SQL Reference.

Authorization

One of the following:

Command Syntax

>>-db2sampl--+------+--+----+----------------------------------><
             '-path-'  '--k-'
 

Command Parameters

path
Specifies the path on which to create the SAMPLE database. The path is a single drive letter for OS/2 and Windows.

If a path is not specified, SAMPLE is created on the default database path (the dftdbpath parameter in the database manager configuration file). On UNIX based systems, the default is the HOME directory of the instance owner. On OS/2 or the Windows operating system, it is the root directory (where DB2 is installed).

-k
Creates primary keys on the following SAMPLE tables:
   Table          Primary Key
   -----          -----------
   DEPARTMENT     DEPTNO
   EMPLOYEE       EMPNO
   ORG            DEPTNUMB
   PROJECT        PROJNO
   STAFF          ID
   STAFFG         ID (DBCS only)

Note:The path must be specified before this option.

Usage Notes

This command can only be executed from server nodes. SAMPLE cannot be created on nodes that are database clients only.

The SAMPLE database is created with the instance authentication type that is specified by the database manager configuration parameter authentication (see GET DATABASE MANAGER CONFIGURATION).

The qualifiers for the tables in SAMPLE are determined by the user ID issuing the command.

If SAMPLE already exists, db2sampl creates the tables for the user ID issuing the command, and grants the appropriate privileges.


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

[ DB2 List of Books | Search the DB2 Books ]