Creating an IBM DB2 database

About this task

Construct the database using scripts loaded during the Trading Manager installation. The minimum disk space required is 200 MB.

To create the IBM DB2 Database, perform the following steps:

Procedure

  1. Contact your Database Administrator (DBA) to get a database name, a user name, and a password.
  2. Verify with the DBA that the autocommit is on. If the autocommit is not on, either issue commits manually, or modify the .sql scripts to include the commits.
  3. Open the db2inst82.sql file in an editor. Change the first executable line to match your database name and user/password. For example, change sample and db2admin in the following executable line:
    connect to sample user db2admin using db2admin
  4. Change the tablespace name (search and replace in USERSPACE1) as directed by your DBA. Trading Manager requires a DB2 tablespace page size of at least 8K; 32K is recommended. Ask your DBA to create such a tablespace, and replace USERSPACE1 with the name of this tablespace
  5. Save the file.
  6. Using the DB2 Command Window, or the Command Line Processor, execute the new db2instnn.sql saved in step 5. Recommended usage is:
    db2 -tvsf 'filepath\db2instnn.sql'>'filepath\logfilename '.
    The Mainframe database tool 'SPUFI' may also be used to execute scripts.
    Note: Your DBA will instruct you on how to run SQL scripts. The scripts supplied are semi-colon delimited, plain text, SQL statements.
  7. After execution, review the results for errors.
  8. Open the db2update82to821.sql file in an editor. Change the first executable line to match your database name and user/password. For example, change sample and db2admin in the following executable line:
    connect to sample user db2admin using db2admin
  9. Change the tablespace name (search and replace in USERSPACE1) as directed by your DBA. Trading Manager requires a DB2 tablespace page size of at least 8K; 32K is recommended. Ask your DBA to create such a tablespace, and replace USERSPACE1 with the name of this tablespace
  10. Save the file.
  11. Using the DB2 Command Window, or the Command Line Processor, execute the new db2update82to821.sql saved above. Recommended usage is:
    db2 -tvsf 'filepath\db2instnn.sql'>'filepath\logfilename '.
    The Mainframe database tool 'SPUFI' may also be used to execute scripts.
  12. After execution, review the results for errors.
  13. Open db2loadnn.sql in an editor and change the connect statement for the database, user name, and password and then save the file.
  14. Using the DB2 Command Window, or the Command Line Processor, execute the new db2loadnn.sql saved above.
  15. After execution, review the results for errors.

    If error free, the installation of .sql scripts is complete.