Setting up a DB2 database

Set up DB2® as a Rational® Connector for SAP Solution Manager database.

About this task

These high-level steps tell you how to configure the Rational Connector to use DB2 as the database:

Procedure

Create the DB2 database

  1. Open the DB2 control center.
    1. For Windows Start > IBM DB2 > General Administration Tools > Control Center.
    2. For Linux The commands to open the DB2 control center vary by operating system. Run the appropriate command.
  2. Right-click All Databases and then click Create Database > Standard. Use all default settings, except these two settings:
    • Change the default buffer pool and table page size to 8K
    • Change the code set to UTF-8
  3. Click Finish. The database is created.

Create the tables within the DB2 database.

  1. From the DB2 control center, click the Command Editor icon from the top icon bar.
  2. Click Add and select the new database as the target.
  3. Cut and paste the contents of Table.ddl from the root directory of the connector installation into the top command-line window.
  4. Click the Execute icon. The tables are created.

Update the connector properties file to point to the DB2 database.

  1. In the root directory of the connector installation, go to the server/conf directory and open the sapconnector.properties file. For example,
    SAPCInstallDir/server/conf/sapconnector.properies
  2. In the properties files, locate these lines:
    #
    # Sample lines for DERBY 
    # com.ibm.rational.connector.sap.db.vendor=DERBY
    # can be relative to SAPC_HOME system variable or absolute com.ibm.rational.connector.sap.db.location=sapc/Derby/SAPConnectorDB 
    #
    # Sample lines for DB2 
    # 
    #com.ibm.rational.connector.sap.db.vendor=DB2 
    #com.ibm.rational.connector.sap.db.location=//localhost:50000/SAPC:user=db2admin;password=<password>;
  3. Comment out the two lines for the Derby database with '#' and uncomment the two lines for DB2.
  4. Replace SAPC with the name of the database you created and db2admin and <password> with the user ID and password for the DB2 daemon identity. If needed, change the port number from 50000 to match that of your DB2 installation.
  5. Save the properties file and close it. The connector properties file is updated to point to the DB2 database.

If you are using WebSphere® Application Server, make the DB2 JDBC drivers accessible to the connector Java™ Platform, Enterprise Edition application, by creating a DB2 JDBC provider on WebSphere Application Server. Skip to the next section if you are using the Apache Tomcat application server.

  1. Open the administrative console by pointing a browser to http://yoursystem:9060/ibm/console
  2. Click Resources > JDBC > JDBC Providers.
  3. On the first page of the wizard, select All Scopes, then select Node=YourNodeName, Server=YourServerSetup. Click New. Set the Database type to DB2, Provider type to DB2, Using IBM JCC Driver and, Implementation type to XA data source.
  4. On the second page of the wizard, set the driver and native library directory paths to be the java and bin directories under SQLLIB. If you do not know where SQLLIB is on your system, see the DB2 documentation.
  5. On the last page of the wizard, click Finish.

Make the DB2 JDBC drivers accessible to Tomcat

  1. Copy the DB2 JDBC drivers to the SAPCInstallDir/server/tomcat/lib directory. You can get db2jcc.jar file from the SQLLIB/java directory of the DB2 installation.

Feedback