Configuring and starting the DirectConnect server

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

StepsCreating and configuring a DirectConnect server

  1. Start the Create Server wizard with the following command:

    DCWizard.sh
    
  2. When the Welcome Create Server Wizard window 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 server 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. Using a text editor, open the %SYBASE%\DC-15_0\servername\cfg\dcany.cfg file, where servername is the name of the server you created in step 3 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 server:

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

      cd /software/sybase/DC-15_0
      
    2. Execute the DC_SYBASE.csh script to set the DirectConnect environment variables.

    3. Navigate to the DirectConnect bin directory:

      cd bin
      
    4. Start the DirectConnect server in the background, which also starts all the configured access services:

      DCStart -Sservername &
      

      Here, servername is the name of the DirectConnect server.

StepsTo verify that you can connect to IBM DB2 Universal Database

  1. Open a command window in the $SYBASE directory of your ECDA installation.

  2. Change to the $SYBASE/DC-15_0 directory.

  3. Set the environment variables by sourcing the $SYBASE/DC_SYBASE.csh file.

  4. Use the isql utility to log in to the IBM DB2 Universal Database through the DirectConnect server:

    isql –Uvaliduser –Ppassword –SDCServer
    

    Here, validuser and password are any valid user and password, and DCServer is the DirectConnect server name.

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

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