Collaboration for Business Console - Preparing DB2 Database

1. Pre-requisites #

To configure DB2, you need the following components:

  • Working DB2 database system.
  • JDBC driver JAR file for DB2 server.In the example, db2jcc4.jar is the JDBC driver JAR file. If you use a different JDBC driver JAR file for DB2, use the correct file name in the commands. You can download the JDBC driver JAR file for DB2 from the DB2 website to any directory on a physical drive (not a mounted drive).
  • Database for Collaboration and a user with full access to that database.

2. Adding JDBC Driver for DB2 #

To add the JDBC driver for DB2, perform the following steps:

1.    Copy the JDBC driver JAR file to a local physical drive (that is, not a mounted volume).

2.    Click Start > All Programs > Software AG > Administration > Collaboration Cloud Controller 9.8 to start the Collaboration Cloud Controller.

3.    At the ACC+ localhost> prompt, type the command:

enhance ecp with commonsClasspath local file <pathToJDBCDriverFile>

Where <pathToJDBCDriverFile> is the absolute path to the copied JDBC driver JAR file.

For example, if the JDBC JAR file is located in c:\temp\db2jcc4.jar, the command would be:

enhance ecp with commonsClasspath local file c:\temp\db2jcc4.jar

If the command was successful, you get an output similar to the following:

Successfully executed Local Enhancement c:/temp/db2jcc4.jar for instance ecp.

Note: You can type “exit” to exit the ACC console.

3.  Registering DB2 DBMS with Collaboration #

To register the DB2 DBMS in the Collaboration service registry, perform these steps to start the registry:

1.    Click Start > All Programs > Software AG > Administration > Collaboration Cloud Controller 9.8 to start the Collaboration Cloud Controller.

2.    At the ACC+ localhost> prompt, type the command:

start zoo

3.    Type the command:

list

You will see an output similar to this:

ACC+ localhost>list
On node localhost 4 runnables are installed.
zoo        : STARTED (com.aris.runnables.zookeeper-run-prod-98.0.0)
ecp        : STOPPED (com.aris.runnables.ecp-run-prod-98.0.0)
elastic      : STOPPED (com.aris.runnables.elasticsearch-run-prod-98.0.0)
umcadmin     : STOPPED (com.aris.umcadmin.y-umcadmin-run-prod-98.0.0)

The “zoo” component  should be shown as STARTED. If not, wait a little longer, and retype “list” until zoo is shown as STARTED.

4.    To register the DBMS, type the command:

register external service DB_ECP
host=<DB2HostnameOrIP>
url=
" jdbc:db2://<DB2HostnameOrIP>:<DB2TcpPort>/<DatabaseName> 
"driverClassName=com.ibm.db2.jcc.DB2Driver jmxEnabled=true
maxActive=100  maxIdle=15 logAbandoned=true
rollbackOnReturn=true maxWait=10000
removeAbandoned=false defaultAutoCommit=false
username=<UserName>
password=<Password>//

Where <DB2HostnameOrIP>, <DB2TcpPort>, <DatabaseName>, <UserName>, and <Password> specify the hostname (or IP address), port, database name, username, and password of your DB2 DBMS.

For example, if your DB2 DBMS is running on mydb2server.example.com machine on port 50000,  database name is COLLABORATION, and the username and password are ecpuser and TopSecret, the actual command would be:

register external service DB_ECP
host=mydb2server.example.com
url=    
"jdbc:db2://mydb2server.example.com:50000/ COLLABORATION"  
driverClassName= com.ibm.db2.jcc.DB2Driver jmxEnabled=true
maxActive=100  maxIdle=15 logAbandoned=true
rollbackOnReturn=true maxWait=10000
removeAbandoned=false defaultAutoCommit=false
username=ecpuser
password=TopSecret//

Note: Type the command in one single continuous line.

If the command completed successfully, you should see an output similar to:

New external service DB_ECP registered with ID db-ecp0000000000 via node localhost

Note down the service ID returned by this command.

5.    To specify Collaboration which DBMS to use for the default tenant, run the command:

assign tenant default to service <ServiceID>

Where <ServiceId> is the ID returned by the previous command .

For example, if the service ID is db-ecp0000000000, the actual command would be:

assign tenant default to service db-ecp0000000000

If the command succeeds, you should see an output similar to:

Successfully assigned tenant default to service db-ecp0000000000.

See also: #