IBM DB2 Everyplace Sync Server Administration Guide Version 7 Release 2 Modification 1


Setting up Sync Server to use JDBC databases

Before you create a JDBC or upload subscription that uses a non-DB2 JDBC driver, you need to configure the Sync Server. This usually includes adding the JDBC driver path to a Sync Server configuration file. For connecting to Microsoft SQL Server and other JDBC-compliant databases, you also must update a driver list file.

After you configure the Sync Server, you can create subscriptions that use the JDBC driver. On the Create JDBC Subscription or Create Upload Subscription notebook, you must specify the correct database type and in some cases, the full name of the driver.

Table 2 and Table 3 list the necessary steps for JDBC and upload subscriptions:

Table 2. Steps for setting up the Sync Server to use JDBC driver for JDBC subscriptions


DB2 UDB Informix, Sybase, or Oracle Microsoft SQL Server
When setting up the Sync Server before using the JDBC driver for the first time: None Add a JDBC driver path
  1. Add a JDBC driver path
  2. Update the driver list file

When creating the subscription, on the Source tab of the Create JDBC Subscription notebook: Select IBM DB2 UDB local from the Driver drop-down list Select the database type from the Driver drop-down list Select Other from the Driver drop-down list and enter the driver's full name in the field to the right

Table 3. Steps for setting up the Sync Server to use JDBC driver for upload subscriptions


DB2 UDB Informix, Sybase, or Oracle Microsoft SQL Server All other JDBC-compliant database
When setting up the Sync Server before using the JDBC driver for the first time: None Add a JDBC driver path Add a JDBC driver path Add a JDBC driver path
When creating the subscription, on the Source tab of the Create Upload Subscription notebook: Select a DB2 UDB driver from the Driver drop-down list Select the database type from the Driver drop-down list Select Other from the Driver drop-down list and enter the driver's full name in the field to the right Select Other from the Driver drop-down list and enter the driver's full name in the field to the right

Adding JDBC driver path for non-DB2 sources

For non-DB2 source databases, you must add the path of the JDBC client driver to a Sync Server configuration file (see the tables on page Table 3). The JDBC client driver is provided by the data source vendor.

To add the JDBC driver path:

  1. Exit the Mobile Devices Administration Center if it is running.
  2. Stop the Sync Server servlet if it is running.
  3. Using a text editor, open \SyncServer\Server\dsysetjavahome.bat file. It is located in the \SyncServer\Server\directory.
  4. Add the complete path of the JDBC driver to the SET JDBC_DRV_CP line of the file. For example, to configure access to an Oracle source using the JDBC client driver installed to C:\Oracle\Ora81\jdbc\lib\, add the following path to the SET JDBC_DRV_CP line of the dsysetjavahome.bat file:
    SET JDBC_DRV_CP=C:\Oracle\Ora81\jdbc\lib\classes111.zip
    

    You can specify multiple JDBC client drivers. For example:

    SET JDBC_DRV_CP=C:\Oracle\Ora81\jdbc\lib\classes111.zip;E:\Informix\JDBC\lib\ifxjdbc-g.jar
    
  5. Restart the Sync Server servlet to make the changes effective.

Updating driver list file to use third-party driver with Microsoft SQL Server

  1. Exit the Mobile Devices Administration Center if it is running.
  2. Stop the Sync Server servlet if it is running.
  3. Using a text editor, open DSYJdbcDriverList.properties file in \SyncServer\Server\classes\com\ibm\mobileservices\ directory. The default contents of the file are:
    # This file specifies which JDBC drivers are used for which databases.
    #
    # Format:
    #   {JDBC driver full-name}={database identifier}
    #
    # The following database identifiers are supported:
    #    DB2 -------------- for DB2 databases
    #    Ifx -------------- for Informix databases
    #    Oracle ----------- for Oracle databases
    #    SQLServer -------- for Microsoft SQL Server databases
    #    Syb -------------- for Sybase databases
     
    # Here is a list of DB2 JDBC drivers:
    COM.ibm.db2.jdbc.app.DB2Driver=DB2
    COM.ibm.db2.jdbc.net.DB2Driver=DB2
    com.ibm.as400.access.AS400JDBCDriver=DB2
     
    # Here is a list of Informix JDBC drivers:
    com.informix.jdbc.IfxDriver=Ifx
     
    # Here is a list of Oracle JDBC drivers:
    oracle.jdbc.driver.OracleDriver=Oracle
     
    # Here is a list of SQL Server JDBC drivers:
    com.jnetdirect.jsql.JSQLDriver=SQLServer
     
    # Here is a list of Sybase JDBC drivers:
    com.sybase.jdbc.SybDriver=Syb
     
     
     
     
    
  4. Add a line to the file to specify the third-party JDBC driver that you want, using the following format:
    JDBC_driver_full_name=SQLServer
    

    For example:

    com.myfastdriver.jdbc.SQLDriver=SQLServer
    
  5. Restart the Sync Server servlet to effect the changes.

Specifying JDBC driver on Create JDBC or Upload Subscription notebooks

When you create a JDBC or upload subscription, you must specify the correct driver on the Source tab of the Creating JDBC Subscription or Create Upload Subscription notebook.

In most cases, you only need to select the correct source database type from the Driver drop-down list. The field to the right will be automatically updated with the full name of the JDBC driver.

For DB2 UDB, select DB2 UDB local if the DB2 database is running on the same machine as the Sync Server. Select DB2 UDB remote if the DB2 database is running remotely. For the latter case, make sure the remote DB2 database is configured correctly to allow proper JDBC connection.

If the database is Microsoft SQL Server (for both JDBC and upload subscriptions) or any other JDBC-compliant database (for upload subscriptions), you must:

  1. Select Other from the list.
  2. Enter the full name of the driver path in the field to the right.


[ Top of Page | Previous Page | Next Page | Table of Contents | Index ]