Later versions of DB2 do not include tooling such as Control Center. If your DB2 version includes Control Center you can follow the steps in Creating and configuring a database using Control Center. Otherwise, convenience scripts are provided for creating a basic test database and you can follow the steps in Creating and configuring a database using scripts.
db2cc
After creating the database additional parameters need to be configured. There is no command line to perform this so the Configuration Assistant and the Control Center must be used:
db2 stop database manager
db2 start database manager
After configuring the database you must create the tablespaces required for the storage and running of the application.
This can be done using the provided Apache Ant scripts by invoking:
ant -f $CURAMSDEJ/util/db2_postconfig.xml -Ddb2.dir=<DB2_directory>
where <DB2_directory> is the DB2 installation path (e.g. <drive>:/IBM/SQLLIB). Otherwise, complete the following steps:
db2 connect to <database_name> user <user_name> using <password>
db2 CREATE BUFFERPOOL highmem SIZE 50 PAGESIZE 32K
db2 connect reset
db2 force application all
db2 terminate
db2 start database manager
db2 connect to <database_name> user <user_name> using <password>
db2 create tablespace Curam_L PAGESIZE 32K MANAGED BY SYSTEM using (<dir_name_A>) BUFFERPOOL highmem
db2 create temporary tablespace Curam_T PAGESIZE 32K MANAGED BY SYSTEM using (<dir_name_B>) BUFFERPOOL highmem
db2 connect reset
- All DB2 commands above are one-line commands (i.e. no line breaks)
- If the username used to connect to the database when executing the commands is not the same as the username which will be used to access the database, the following command should also be executed, where <user_name> is the name of the user that will be used to access the database:
db2 grant use of tablespace Curam_L to user <user_name> with grant option
Ant scripts are provided for creating and configuring a basic test database. To create a database, invoke the following commands, which use the database properties from your Bootstrap.properties file:
where <DB2_directory> is the DB2 installation path (e.g. /IBM/SQLLIB).
Note: this script restarts your DB2 system.
The following script invocation can be used to drop the database to rerun the process above:
ant -f $CURAMSDEJ/util/db2_createdb.xml dropdb
This post-installation step is required for all users of IBM DB2 for Linux, Unix and Windows for the IBM Cúram Social Program Management Platform development or runtime environments.
An empty db2jcc_license_cu.jar file exists in the $CURAMSDEJ/drivers directory. This empty jar should be overwritten with a real license for accessing IBM DB2 for Linux, Unix and Windows.
The IBM DB2 db2jcc_license_cu.jar file should be copied from <DB2_directory>/java/db2jcc_license_cu.jar (where <DB2_directory> is the DB2 installation path; e.g. /opt/ibm/db2) to $CURAMSDEJ/drivers (where $CURAMSDEJ points to the root CuramSDEJ location).
Please refer to the Cúram Supported Prerequisites document for further information regarding the supported versions of third party database software.
Usually the latest JDBC drivers available at the time of release are packaged with IBM Cúram Social Program Management. However, if you wish to replace the drivers shipped in $CURAMSDEJ/drivers, copy the following files from <DB2_directory>/java.
(where <DB2_directory> is the DB2 installation path e.g. <drive>:/IBM/SQLLIB)
Replace the drivers db2jcc.jar, db2jcc_license_cu.jar, and sqlj.zip in $CURAMSDEJ/drivers directory.
Please refer to the Cúram Supported Prerequisites document for details of the supported versions of third party products.
When using DB2 pureScale® with Cúram you will need to perform the following steps to set the necessary data source property or properties when using DB2 from the command line (e.g. with Cúram batch processing). See the relevant Information Centers for DB2 and WebSphere for their specific pureScale settings.
You must generate a .bindings file based on your Bootstrap.properties file database settings, which specify the DB2 pureScale connect member. To do this:
From this point forward the Cúram DB2 data source, when used from the command line, will use these properties and changes to the database properties in Bootstrap.properties would need to be reflected in .bindings or by rerunning the procedure above. However, Ant scripts using the <sql> task will not use these pureScale settings. These Ant scripts (e.g. database target) are typically not run frequently nor have a processing profile that would require pureScale settings; but, you can modify scripts as needed to specify these properties using the Ant <connectionProperty> nested element.