WebSphere Enterprise Service Bus, Version 6.2.0 Operating Systems: AIX, HP-UX, i5/OS, Linux, Solaris, Windows


Creating the DB2 database

In order to create a Common database manually, you need to edit and run the scripts that come with WebSphere® ESB. This topic tells you how to edit and run scripts associated with the DB2® database.

About this task

Before you can run scripts to create a DB2 database manually, you need to customize them for WebSphere ESB. WebSphere ESB comes with following scripts:
Table 1. DB2 scripts for WebSphere ESB
createTable_CommonDB.sql
createTable_lockmanager.sql
createTable_Recovery.sql
createTable_EsbLoggerMediation.sql
createTable_governancerepository.sql
insertTable_CommonDB.sql
createTable_Relationship.sql
createTable_AppScheduler.sql
createTable_mediation.sql
createTable_RelationshipMetadataTable.sql
createTable_RelationshipViewMetaTable.sql
createTable_customization.sql
createTable_DirectDeploy.sql
Procedure
  1. Make sure that you are using a user ID with sufficient authority to update the database schema.
  2. Locate the directory where the database scripts are located:
    • For i5/OS operating systemFor Linux operating systemFor UNIX operating system <media_root>/dbscripts/CommonDB or <extract_directory>/dbscripts/CommonDB
    • For Windows operating system <media_root>\dbscripts\CommonDB or <extract_directory>\dbscripts\CommonDB
  3. Locate the configCommonDB.bat or configCommonDB.sh file and perform the following subtasks:
    1. Replace the DB_NAME variable with the database name, for example WPRCSDB.
    2. Replace the DB_USER variable with the database user name, for example db2admin.
    Important: You need to pass the createDB parameter to the configCommonDB script if you want to create a new local database; otherwise an existing database will be used.
  4. Locate the createDatabase_CommonDB.sql file and perform the following subtask.
    1. Replace the DB_NAME variable with the database name, for example WPRCSDB.
  5. Locate the insertTable_CommonDB.sql file and replace the following variables with the WebSphere ESB version you are installing. For example, if the WebSphere ESB version is 6.2.0.0 then:
    1. Replace the MajorVersion variable with the first digit of the product version number, for example 6.
    2. Replace the MinorVersion variable with the second digit of the product version number, for example 2.
    3. Replace the RefreshPackLevel variable with the third digit of the product version number, for example 0.
    4. Replace the FixpackLevel variable with the fourth digit of the product version number, for example 0.
  6. Run the configCommonDB.bat or configCommonDB.sh script. This in turn will run the createDBTables script to create the necessary schema and tables for the Common database.
  7. If there are any errors, or failure is indicated in your database client output, fix the reported errors and try again.

Results

The DB2 database is created.

task Task topic

Terms of use | Feedback


Timestamp icon Last updated: 21 June 2010


http://publib.boulder.ibm.com/infocenter/dmndhelp/v6r2mx/topic//com.ibm.websphere.wesb620.doc/doc/tins_edit_db2_scripts.html
Copyright IBM Corporation 2005, 2010. All Rights Reserved.
This information center is powered by Eclipse technology (http://www.eclipse.org).