These instructions assume that you are using DB2 Universal Database and guide you through the following tasks:
Note. When you create and access the database tables, be aware of the following issues:
Complete the following steps:
db2start
On Windows:
You must replace install_dir with the path to your DB2 product installation directory, such as C:\PROGRA~1\IBM\SQLLIB. You can find this location by using the db2level command:CONNECT TO PATSDB BIND 'install_dir\bnd\@db2cli.lst' blocking all grant public TERMINATE
On Linux:
You must replace install_dir with the path to your DB2 product installation directory. You can find this location by using the db2level command:CONNECT TO PATSDB BIND install_dir/bnd/@db2cli.lst grant public CLIPKG 5 TERMINATE
db2 -vf PATSDB.sql
CONNECT TO PATSDB@ DROP TABLE "PATIENTS"@ CREATE TABLE "PATIENTS" ( "DEVICEID" VARCHAR(50) NOT NULL PRIMARY KEY, "PATIENTID" VARCHAR(50) ) DATA CAPTURE NONE@ TERMINATE@
db2 -td@ -vf patients_create_tables_db2.sql
Wait for the script to finish running. If you are running the script for the first time, the following message is displayed:
DB21034E The command was processed as an SQL statement because it was not a valid Command Line Processor command. During SQL processing it returned: SQL0204N "DB2ADMIN.PATIENTS" is an undefined name. SQLSTATE=42704Ignore this message. The message is displayed because the script attempts to remove the existing table, PATIENTS, before it creates the new table, but if you have not run the script before, the script cannot find the existing table.
Back to Setting up the patient identifier database