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 DirectConnect server creation wizard starts. Click Next.

  2. Select ECDA Option for ODBC. Click Next.

  3. Enter the server name for the new DirectConnect server (for example, “DCServer”) 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 standby Microsoft SQL Server database, for example, my_standby_mssql_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. Click Next when the DirectConnect server prompts you.

  7. When the Start DirectConnect Server (Optional) screen appears, click Finish.

    If you have accidentally started the DirectConnect server, shut it down before proceeding:

    %SYBASE%\DC-15_0\bin\stopsrvr -SDCServer
    

    where DCServer is the name of the DirectConnect server.

  8. Using a text editor, open the %SYBASE%\DC-15_0\servers\<servername>\cfg\dcany.cfg file, where <servername> is the name of the server you created in step 3 using the DCWizard.

  9. 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. Make sure that the file has at minimum the following configuration lines and that the options are set as follows:

    [Service Library]
    
    {Client Interaction}
    
    [my_standby_mssql_service]
    
    {ACS Required}
    
    ConnectionSpec1=my_standby_mssql_datasource
    
    {Client Interaction}
    
    EnableAtStartup=yes
    
    TransactionMode=long
    

    NoteTransactionMode=long indicates that the client session will manually issue the commit command for transactions.

    Save the file.

  10. Start the DirectConnect server:

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

      cd %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 -SDCServer
      

      where DCServer is the name of the DirectConnect server.

      Wait until the DirectConnect server indicates that it is ready for connections before proceeding to the next step.

StepsTo verify 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 executing the %SYBASE%\DC_SYBASE.bat file.

  4. Use the Sybase isql utility to log in to Microsoft SQL Server through the DirectConnect service:

    isql –Uvaliduser –Ppassword 
    –Smy_standby_mssql_service
    

    Here, validuser and password are any valid user and password, and my_standby_mssql_service is the ECDA access service name identified in the previous procedure.

  5. Verify the connection to the standby 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.