Creating and Configuring a DirectConnect Service

Use the Create Server wizard to create a DirectConnect service.

  1. Start the Create Server wizard.
    • For UNIX or Linux:

      DCWizard.sh
    • For Windows:

      DCWizard.bat
  2. When the Welcome Create Server wizard appears, click Next.
  3. Select the ECDA Option for ODBC option, and click Next.
  4. Enter the server name for the new DirectConnect service and the port number that you want the server to listen on. Click Next.
  5. Select the unixODBC Driver Manager without a Driver Manager option, and click Next.
  6. Select:
    • The path to the IBM DB2 Universal database ODBC Driver file, for example:

      /software/IBM/db2_09_01/lib/libdb2.so
      Note:

      Version 9.1 of the HP Itanium IBM DB2 Universal database ODBC 64-bit driver is named libdb2o.so.

    • On UNIX or Linux, the DB2 script file that must be sourced before the DirectConnect service is started.

      If you have customized the IBM DB2 Universal Database environment script, use the path to that script. Otherwise, use the path to the original IBM DB2 Universal Database script, either db2cshrc or db2profile.

      For example, to use your customized script for C shell, enter:

      source path/mydb2cshrc

      where path is the full path to the directory in which you saved your customized file.

      For example, to use the original IBM DB2 Universal Database script for Bourne or Korn shell, enter:

      . path/sqllib/db2profile

      where path is the home directory of the owner of the replicate IBM DB2 Universal Database instance.

    Click Next.
  7. Enter the ECDA access service name that you want to use for this server, and click Next.
  8. Verify the ECDA Server information that appears:
    • If correct, select Create Server. The Start DirectConnect server (Optional) window appears.

    • If incorrect, click Back to change the information.

  9. Open the %SYBASE%\DC-15_0\servername\cfg\dcany.cfg file (Windows) or the $SYBASE/DC-15_0/servername/cfg/dcany.cfg file (UNIX or Linux), where servername is the name of the server you created.
  10. In the file, locate the name of the IBM DB2 Universal Database access service that you created above. Under that, set the ConnectionSpec1 parameter to the name of the IBM DB2 Universal Database ODBC data source you created. For example:
    [Service Library]
    {Logging}
    LogSvcLibStatistics=0
    {Client Interaction}
    SvclibDescription=Access Service Library for ODBC
    [my_udb_access_service]
    {ACS Required}
    ConnectionSpec1=my_udb_datasource_name
  11. Start the DirectConnect service:
    1. Navigate to the DirectConnect installation directory, for example:
      cd /software/sybase/DC-15_0
    2. Execute DC_SYBASE.csh (UNIX or Linux) or DC_SYBASE.bat (Windows) to set the DirectConnect environment variables.
    3. Navigate to the DirectConnect bin directory.
    4. Start the DirectConnect service in the background, which also starts all the configured access services:
      DCStart -Sservicename &

      where servicename is the name of the DirectConnect service.