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 by navigating to the %SYBASE%\DC-15_0\DCWizard directory and executing the DCWizard script. The Welcome Create Server wizard appears. Click Next.

  2. Select ECDA Option for ODBC. Click Next.

  3. Enter the server name for the new DirectConnect server and the port number that you want the server to listen on. Click Next.

  4. Enter the ECDA access service name that you want to use for the replicate Microsoft SQL Server database, for example, my_mssql_access_service. Click Next.

  5. Verify the DirectConnect server information. If correct, select Create Server. Otherwise, click Back to return to the previous window and provide the correct information.

  6. Open the %SYBASE%\DC-15_0\servers\servername\cfg\dcany.cfg file, where servername is the name of the server you created using the DCWizard.

  7. In the file, locate the name of the Microsoft SQL Server access service that you created in step 4 using the DCWizard. Under that, set the ConnectionSpec1 parameter to the name of the Microsoft SQL Server ODBC data source you created. For example:

    [Service Library]
    
    {Client Interaction}
    
    SvclibDescription=Access Service Library for ODBC
    
    {Logging}
    
    LogSvcLibStatistics=0
    
    [my_mssql_access_service]{ACS Required}
    
    ConnectionSpec1=my_mssql_datasource_name
    
    {Client Interaction}
    
    EnableAtStartup=yes
    
    TransactionMode=long
    
  8. Start the DirectConnect server:

    1. Open a command window, and navigate to the DirectConnect installation directory. For example:

      cd c:\sybase\DC-15_0
      
    2. Execute the DC_SYBASE.bat script to set the DirectConnect environment variables.

    3. Navigate to the DirectConnect bin directory:

      cd bin
      
    4. Start the DirectConnect server. This also starts all of the configured access services:

      DCStart -Sservername
      

      Here, servername is the name of the DirectConnect server.

  9. Click Finish.

StepsVerifying that you can connect to Microsoft SQL Server

  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.bat file.

  4. Log in to Microsoft SQL Server through the DirectConnect service:

    isql –Uvaliduser –Ppassword –Smy_mssql_access_service
    

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

  5. Verify the connection to the replicate Microsoft SQL Server database by obtaining the DBMS name and version number:

    select @@sqldbmsname
    
    go
    
    SQLDbmsName
    
    ---------------------
    
    Microsoft SQL Server
    
    select @@sqldbmsver
    
    go
    
    SQLDbmsVer
    
    ---------------------
    
    09.00.1399
    
  6. Exit the isql session with the quit command.