Opencrx Installation Guide For Ibm Db2 V9.5 (Express C) : Version 2.0 / 2.1
Opencrx Installation Guide For Ibm Db2 V9.5 (Express C) : Version 2.0 / 2.1
Opencrx Installation Guide For Ibm Db2 V9.5 (Express C) : Version 2.0 / 2.1
5
(EXPRESS C)
www.opencrx.org
License
The contents of this file are subject to a BSD license (the "License"); you may not use this file except in compliance
with the License. You may obtain a copy of the License at http://www.opencrx.org/license.htm
Table of Contents
1 About this Book..............................................................................3
1.1 Who this book is for............................................................. 3
1.2 What do you need to understand this book............................. 3
1.3 Tips, Warnings, etc.............................................................. 3
2 Prerequisites..................................................................................4
3 Upgrading from previous versions..................................................5
3.1 The SQL Script upgrade-from-.............................................. 5
3.2 The SQL Script migrate-from-............................................... 5
3.3 The SQL Script drop-from-................................................... 5
3.4 The SQL Script dbcreate-views.sql......................................... 6
3.5 The SQL Script dbcreate-indexes.sql...................................... 6
3.6 Populate Preferences........................................................... 6
4 Create the database....................................................................... 7
5 Install the openCRX Database Schema Objects............................ 12
6 Next Steps....................................................................................15
List of Figures
Figure 1: Create a new database.............................................................. 7
Figure 2: Create schema CRX_CRX........................................................... 8
Figure 3: Specify Storage options............................................................. 8
Figure 4: Specify Region options............................................................... 9
Figure 5: Verify settings........................................................................ 10
Figure 6: Create New User – step 1......................................................... 10
Figure 7: Create New User – step 2......................................................... 11
Figure 8: Open Command Editor............................................................. 12
Figure 9: Execute script dbcreate-tables.sql.............................................. 13
Figure 10: Verify creation of tables, views, and indexes.............................. 14
List of Listings
Listing 1: Creating Buffer Pools and Table Spaces with 32K Page Size..........11
—2—
openCRX Installation Guide for IBM DB2 v9.5 (EXPRESS C) - Version 2.0
About this Book
—3—
openCRX Installation Guide for IBM DB2 v9.5 (EXPRESS C) - Version 2.0
Prerequisites
2 Prerequisites
As a first step you must download the following software packages:
● Download and install openCRX SDK Installer. It is available from
http://www.opencrx.org/sdk.htm
The SDK contains DB2 scripts required to install the openCRX database
in the directory <SDK_Install_Dir>\opencrx-x.x.x\core\src\sql
● Download DB2 Express-C data server from http://www-
306.ibm.com/software/data/db2/express/download.html
● Download DB2 Data Server Driver for JDBC and SQLJ from
http://www-306.ibm.com/software/data/db2/express/download.html
Please ensure that you install the correct JDBC driver (i.e. matching
JDK, DB2 version, etc.) and one JDBC driver only! Ignoring this
wisdom leads to problems as the connection to the database will fail.
As a next step you must install IBM DB2 (please refer to the appropriate
documentation from IBM for installation details).
This document assumes that you use the DB2 Control Center for database
administration.
—4—
openCRX Installation Guide for IBM DB2 v9.5 (EXPRESS C) - Version 2.0
Upgrading from previous versions
Backup your database BEFORE you run any of the following scripts!
—5—
openCRX Installation Guide for IBM DB2 v9.5 (EXPRESS C) - Version 2.0
Upgrading from previous versions
—6—
openCRX Installation Guide for IBM DB2 v9.5 (EXPRESS C) - Version 2.0
Create the database
—7—
openCRX Installation Guide for IBM DB2 v9.5 (EXPRESS C) - Version 2.0
Create the database
Enter CRX_CRX as database name and select 32K as page size (experienced
DB2 DBAs might want to create multiple table spaces for optimization
reasons). Click Next:
—8—
openCRX Installation Guide for IBM DB2 v9.5 (EXPRESS C) - Version 2.0
Create the database
Specify Region options (we strongly recommend the UTF-8 code set):
If you want/need UTF-8 support you should select code set UTF-8
—9—
openCRX Installation Guide for IBM DB2 v9.5 (EXPRESS C) - Version 2.0
Create the database
Next we need to create a new user. Navigate to the newly created database
and look for the entry User and Group Objects. Right-click the subentry
DB Users and then select Add from the pop-up menu as shown below:
— 10 —
openCRX Installation Guide for IBM DB2 v9.5 (EXPRESS C) - Version 2.0
Create the database
Enter SYSTEM and select the appropriate authorities (the user must be able
to connect to the database!):
In case you did not select page size 32K when you initially created the
database, you may want to create a Buffer Pool BP32K (Page Size of
32K) and 2 Table Spaces CRXTS32 and CRXTMPSPC32 a as follows
(default Table Spaces rely on 4K page sizes, insufficient for openCRX):
Listing 1: Creating Buffer Pools and Table Spaces with 32K Page Size
CREATE BUFFERPOOL BP32K IMMEDIATE SIZE 250 AUTOMATIC PAGESIZE 32 K ;
CREATE LARGE TABLESPACE CRXTS32 PAGESIZE 32K MANAGED BY AUTOMATIC STORAGE AUTORESIZE YES BUFFERPOOL
BP32K;
CREATE SYSTEM TEMPORARY TABLESPACE CRXTMPSPC32 PAGESIZE 32K MANAGED BY AUTOMATIC STORAGE BUFFERPOOL
BP32K;
— 11 —
openCRX Installation Guide for IBM DB2 v9.5 (EXPRESS C) - Version 2.0
Install the openCRX Database Schema Objects
Navigate to the newly created database. Right-click on it and then select Query
from the pop-up menu to open a command editor as shown below:
— 12 —
openCRX Installation Guide for IBM DB2 v9.5 (EXPRESS C) - Version 2.0
Install the openCRX Database Schema Objects
— 13 —
openCRX Installation Guide for IBM DB2 v9.5 (EXPRESS C) - Version 2.0
Install the openCRX Database Schema Objects
The scripts should run without errors and after execution you should be able to
inspect all the newly created tables, views, and indexes:
— 14 —
openCRX Installation Guide for IBM DB2 v9.5 (EXPRESS C) - Version 2.0
Next Steps
6 Next Steps
If you have completed successfully the database installation you are ready to
use the openCRX database CRX_CRX. The application server installation
guides explain how to connect the application server to the openCRX database
instance.
— 15 —