These tables can be built during installation
of the CONNX DB2 client, or later via a command prompt (MS-DOS). The following
procedures encompass both methods. See Step
8 - DB2 Host Configuration for configuration information before
attempting to install the sample database tables.
Note: Refer to the CONNX
User Reference Guide online or on the
distribution media for more detailed information about logging on and
dialog box text boxes and options.
During installation, click Yes to install sample database tables, or click the Start button, and then point to All Programs. Point to CONNX Sample Databases, and click Build DB2 Sample Data. You may also start an MS-DOS command prompt, and then go to the CONNX installation directory. Select the Utils subdirectory, for example, C:\connx32\Utils. From the MS-DOS command prompt start the CONNX sample tables application by typing start sampgen db2
The first DB2
Sample Database Logon dialog box appears after the prompt,
before installation completes, or if you selected Build
DB2 Sample Data in the program group.
In this example, the RDBNAME is an example; substitute the RDBNAME
or location name of the target DB2 host.
Click the Settings
tab.
The owner list shows a sample schema name = CONNX. All DB2 databases
require three-part names for SQL objects, such as tables and views.
A fully qualified table name is as follows:
Rdbname.schema.table
where, for example,
Rdbname = sample
schema = connx
table = customers_db2
If the Owner List field
is left blank, CONNX creates the sample tables with the userid as
the schema/owner/library/collection name; hence the above table is
created as
Sample.db2admin.customers_db2
If the specified or default schema/owner/library/collection does not
exist, the attempt to build the sample tables fails with a schema/owner/library/collection
not found SQLState/SQLCode.
Note: This example connects to a DB2 UDB 6.1 database running on Windows. The symbolic TCP/IP address is CONNXDB2. The Build Packages check box remains unchecked, which indicates that the DB2 dynamic SQL packages have already been built in the NULLID schema. These packages must be built prior to executing the DB2 sample application.