Previous Topic: Step 5. Install the Appropriate ODBC Driver

Next Topic: Security Considerations for History Records


Step 6. Configure ODBC

Note: Configuration is different for MySQL and DB2. DB2 configuration is accomplished by using the DB2/UDB configuration tool. The following describes one method of configuring the ODBC driver for MySQL. Note that the instructions may vary depending on the release installed. The steps needed for DB2 are similar. For more information refer to the documentation provided by the database vendor.

To configure ODBC

  1. Use the odbcinst-j command to find the location of the odbcinst.ini and odbc.ini files.
  2. Edit the odbcinst.ini file and set the DRIVER= parameter to the MySQL 32-bit ODBC driver. For example:
    DRIVER=/opt/MySQL/mysql-connector-odbc-5.1.7-linux-glibc2.3-x86-32bit/lib/libmyodbc5.so
    
  3. Edit the odbc.ini file and add the following parameters:

    [Data Source Name]

    DESCRIPTION={option}

    DRIVER=MySQL ODBC 5.1 Driver name

    SERVER=XCOM_MACHINE

    PORT=3306

    DATABASE=XCOM History Database Name

    UID=xcomuser

    PWD=mypassword

    Fill in the form as follows:
    Data Source Name

    XCOMHIST or another name defined to be the data source name.

    Description

    Optional; can contain whatever you like.

    Driver

    The name of the ODBC driver as defined in the odbcinst.ini file.

    Server

    The name of the machine containing the database.

    Database

    The name of the database created in Step 2, Create a Database.

    Port

    The port number defined when MySQL was installed. The default port is 3306.

    UID

    The name of the user that will be connecting to the database. On the machine in which the database is installed the user should be set to root. On all other machines connecting to this database the name should be something common, like XCOMUSER.

    PWD

    Should be set on the machine that owns the database and must match the password that was set when MySQL was installed.

  4. Verify the ODBC connection.

    Issue the following command:

    -isql -v {DSN}
    

    Where {DSN} is the datasource name in the ODBC.ini file that was added in step 3.

    Example:

    isql -v XCOMHIST
    

    A connected message will be displayed if the connection is successful.

  5. Database authorization must be established for the user defined in the XCOMHIST_USER parameter within the XCOM global parameters.
    Enter the following:
    CREATE user ‘xcomhist_user’@’%’;
    

    The % indicates that you will accept xcomhist_user from any host.

    To be more restrictive, code the following (for example):

    CREATE user ‘xcomhist_user’@’user01-xp.ca.com’;
    
    Grant each user accessing your database with certain privileges:
    GRANT {all/select,insert}  on xcomhist.* to ‘xcomhist_user’@’{%/machine}’;
    
  6. You are now ready for XCOM to create history records.

Configuring JDBC Database Access

The standalone UI in CA XCOM Data Transport is a Java based application that uses JDBC to communicate with the database for accessing the trusted transfer tables. If you do not plan on using trusted transfers then you can skip configuring the JDBC drivers.

To configure the DB2 JDBC drivers:
  1. Locate the DB2 database driver jar files db2jcc.jar and db2jcc_license_cu.jar. In most installations these files are in the DB2 java directory.
  2. Copy the database driver jar files to the XCOM_HOME/lib directory.
  3. Add the directory path of the database driver jar files as an external directory (-java.ext.dirs) in the XCOM_HOME/bin/StandaloneUI.sh file.

Example:

-Djava.ext.dirs=$XCOM_HOME/lib:/opt/DB2path/java

To configure the MySQL JDBC drivers:
  1. Locate the MySQL database driver jar file mysql-connector-java-x.x.x-bin.jar, where x.x.x is the release of MySQL. If the file is not part of your MySQL installation, it can be found on the mysql.com site by looking for the mysql connector/j feature.
  2. Manually copy the database driver jar file to the XCOM_HOME/lib directory.
  3. Add the directory path of the database driver jar file as an external directory (-Djava.ext.dirs) in the XCOM_HOME/bin/StandaloneUI.sh file.

Example:

-Djava.ext.dirs=$XCOM_HOME/lib:/opt/mysqlpath/java