Configuring and starting the DirectConnect service

Before you begin to create and configure the DirectConnect service, make sure that:

StepsCreating and configuring 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. The Create DirectConnect Server Options window appears.

  3. Select the ECDA Option for ODBC option, and click Next.

    The Server Name and Port Information window appears.

  4. Enter the server name for the new DirectConnect service and the port number that you want the server to “listen” on. Click Next.

    The ECDA - ODBC Driver Manager Options window appears.

  5. Select the unixODBC Driver Manager without a Driver Manager Option, and click Next. The Driver Manager Information window appears.

  6. Select the following from the browse files:

  7. Click Next. The DirectConnect Service Name window appears.

  8. Enter the ECDA access service name that you want to use for this server, and click Next. The ECDA Server Summary and Build window appears.

  9. Verify the ECDA Server information that appears:

  10. 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 using the DCWizard.

  11. In the file, locate the name of the IBM DB2 Universal Database access service that you created in step 4 above using the DCWizard. 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
    
  12. Start the DirectConnect service:

    1. Navigate to the DirectConnect installation directory, for example:

      cd /software/sybase/DC-15_0
      
    2. Execute the DC_SYBASE.csh (UNIX or Linux) or DC_SYBASE.bat (Windows) script 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 &
      

      Here, servicename is the name of the DirectConnect service.

StepsVerifying that you can connect to IBM DB2 Universal Database

  1. Open a command window in the $SYBASE (UNIX or Linux) or %SYBASE% (Windows) directory of your ECDA installation.

  2. Change to the $SYBASE/DC-15_0 (UNIX or Linux) or %SYBASE%\DC-15_0 (Windows) directory.

  3. Set the environment variables by sourcing the $SYBASE/DC_SYBASE.csh file (UNIX or Linux) or by running the %SYBASE%\DC_SYBASE.bat file (Windows).

  4. Log in to the IBM DB2 Universal Database through the DirectConnect service:

    isql –Uvaliduser –Ppassword –SDCService
    

    Here, validuser and password are any valid user and password, and DCService is the DirectConnect service name.

  5. Verify the connection to the replicate IBM DB2 Universal Database:

    select @@sqldbmsname
    
    go
    
    SQLDbmsName
    
    ---------------------
    
    DB2/SUN
    
    select @@sqldbmsver
    
    go
    
    SQLDbmsVer
    
    ---------------------
    
    09.01.0005
    
  6. Exit the isql session with the quit command.