Post-installation

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.

Creating and configuring a database using Control Center

  1. Go into the General Administration Tools/Control Center.
  2. Select theDatabases folder (All Systems... <Hostname>... Instances... DB2... Databases).
  3. Right click the mouse.
  4. SelectCreate Database... Standard.
  5. There are six pages and a summary to the wizard:
  6. On page one, fill in the database name (alias should be the same as the name);

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:

  1. Go into the General Administration Tools/Control Center.
  2. Select theDatabases folder (All Systems... <Hostname>... Instances... DB2... Databases).
  3. Select the database that was created in the previous step.
  4. Right click the mouse.
  5. SelectConfigure Parameters.
  6. Update theLOCKTIMEOUT - Set Lock timeout (in theApplications section) to at least1 second, or any desired higher value.
  7. Reboot the PC or cycle all DB2 services. To cycle all DB2 services, please do the following from within a DB2 command prompt:
    • connect reset
    • force application all
    • db2stop
    • db2start

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:

  1. Start a db2cmd window by running the db2cmd command at the command prompt.
  2. Enter the following at the command prompt:

    db2 connect to <database_name> user <user_name> using <password>

    db2 CREATE BUFFERPOOL highmem SIZE 50 PAGESIZE 32K

    db2 connect reset

  3. Reboot the PC or cycle all DB2 services. Please see above for details on how to cycle all DB2 services.
  4. Start a db2cmd window.
  5. Enter the following at the command prompt:

    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

  6. Reboot the PC or cycle all DB2 services. Please see above for details on how to cycle all DB2 services.
Note: -<dir_name_A> and <dir_name_B> should be non-existent directories, i.e. directories that don't exist before the command is run - on a drive with a significant amount of space.

- 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

Creating and configuring a database using scripts

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:

The following script invocation can be used to drop the database to rerun the process above:

ant -f %CURAMSDEJ%\util\db2_createdb.xml dropdb

Providing a DB2 License File

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 to allow for Eclipse classpath dependencies in the CuramSDEJ project. 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. C:\IBM\SQLLIB) 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.

Replacing the Packaged DB2 Drivers

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 sqlj4.zip in %CURAMSDEJ%\drivers directory.

Please refer to the Cúram Supported Prerequisites document for details of the supported versions of third party products.

Using DB2 pureScale

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:

  1. In your Bootstrap.properties file set property curam.db.enable.bindings.generation=true and specify a valid location value for property curam.environment.bindings.location; e.g., curam.environment.bindings.location=C:/Temp;
  2. Run the Ant configtest target, which will cause the .bindings file to be generated in the specified location;
  3. In your Bootstrap.properties file remove curam.db.enable.bindings.generation=true or set it to false and set curam.db.disable.bindings.generation=true;
  4. Set the Content value for the relevant pureScale data source properties in the .bindings file (much easier if you sort it first); for example, set enableSysplexWLB to 'true'. Save the changes.

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.