Create a DB2 database for the UDDI Registry

Perform this task if you want to use DB2 as the database store for your UDDI Registry data. You only need to do this once for each UDDI Registry, as part of Setting up and deploying a UDDI Registry.

 

Overview

Before you begin

The steps below use a number of variables for which we need to enter appropriate values. You should decide the values that you will use before you start. The variables used, and suggested values are:

<DataBaseName>

is the name of the UDDI Registry database. A recommended value is UDDI30, and this name is assumed throughout the UDDI documentation. If you use some other name, then you should substitute that name whenever you see 'UDDI30' in other sections of the documentation.

<DB2UserID>

is a DB2 userid with administrative privileges.

<DB2Password>

is the password for the DB2 userid.

<BufferPoolName>

is the name of a buffer pool to be used by the UDDI Registry database. A suggested name is uddibp, but any name can be used, as the buffer pool is created as part of this task.

<TableSpaceName>

is the name of a table space. A suggested value is uddits, but any name can be used.

<TempTableSpaceName>

is the name of a temporary table space. A suggested value is udditstemp, but any name can be used, as the temporary table space is created as part of this task.

To create the DB2 database follow the steps shown below:

 

Procedure

  1. Change directory to install_root/UDDIReg/databaseScripts.

  2. Start the DB2 Command Line Processor by entering db2 at the command prompt (for Windows, enter db2cmd and then enter db2 in the new DB2 window). The commands in the remaining steps should all be entered from the DB2 Command Line Processor.

  3. Run the following command to setup the DB2 environment variables:

    set DB2CODEPAGE=1208
    

  4. Create the DB2 database by entering the following command:

    create database <DataBaseName> using codeset UTF-8 territory en
    
    where <DataBaseName> is the name of the database being created.

  5. Configure the DB2 database by entering the following commands:

    1. connect to <DataBaseName> user <DB2UserID> using <DB2Password>

    2. update db cfg for <DataBaseName> using applheapsz 2048

    3. update db cfg for <DataBaseName> using logfilsiz 8192

    4. connect reset

    5. terminate

  6. Create additional database structures by entering the following commands:

    1. connect to <DataBaseName> user <DB2UserID> using <DB2Password>

    2. create bufferpool <BufferPoolName> size 250 pagesize 32K

    3. connect reset

    4. terminate

    5. force application all

    6. terminate

    7. stop

    8. start

  7. Create further database structures by entering the following commands:

    1. connect to <DataBaseName> user <DB2UserID> using <DB2Password>

    2. create regular tablespace uddits pagesize 32K managed by system using ('<TableSpaceName>') extentsize 64 prefetchsize 32 bufferpool <BufferPoolName>

    3. create system temporary tablespace <TempTableSpacename> pagesize 32K managed by system using ('<TempTableSpacename>') extentsize 32 overhead 14.06 prefetchsize 32 transferrate 0.33 bufferpool <BufferPoolName>

  8. Enter the following commands exactly as shown (noting in particular one step uses -vf rather than -tvf) to define the database structures needed to store the UDDI data:

    1. -tvf uddi30crt_10_prereq_db2.sql

    2. -tvf uddi30crt_20_tables_generic.sql

    3. -tvf uddi30crt_25_tables_db2udb.sql

    4. -tvf uddi30crt_30_constraints_generic.sql

    5. -tvf uddi30crt_35_constraints_db2udb.sql

    6. -tvf uddi30crt_40_views_generic.sql

    7. -tvf uddi30crt_45_views_db2udb.sql

    8. -vf uddi30crt_50_triggers_db2udb.sql

    9. -tvf uddi30crt_60_insert_initial_static_data.sql

  9. This last step should only be run if you want your database to be used as a default UDDI node. Enter the following command:

    -tvf uddi30crt_70_insert_default_database_indicator.sql
    

 

What to do next

Continue with setting up and deploying your UDDI Registry node.


 

Related Tasks


Creating a Cloudscape database for the UDDI Registry
Creating an Oracle database for the UDDI Registry