Before you begin to create and configure the DirectConnect server, make sure that:
The name for a valid Microsoft SQL Server account is available. This name is used as the administrator for the DirectConnect server.
The number of the unused port to be used by the DirectConnect server is available.
Creating and configuring a DirectConnect server
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.
Select ECDA Option for ODBC. Click Next.
Enter the server name for the new DirectConnect server and the port number that you want the server to listen on. Click Next.
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.
Verify the DirectConnect server information. If correct, select Create Server. Otherwise, click Back to return to the previous window and provide the correct information.
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.
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
Start the DirectConnect server:
Open a command window, and navigate to the DirectConnect installation directory. For example:
cd c:\sybase\DC-15_0
Execute the DC_SYBASE.bat script to set the DirectConnect environment variables.
Navigate to the DirectConnect bin directory:
cd bin
Start the DirectConnect server. This also starts all of the configured access services:
DCStart -Sservername
Here, servername is the name of the DirectConnect server.
Click Finish.
Verifying that you can connect to Microsoft SQL
Server
Open a command window in the %SYBASE% directory of your ECDA installation.
Change to the %SYBASE%\DC-15_0 directory.
Set the environment variables by sourcing the %SYBASE%\DC_SYBASE.bat file.
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.
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
Exit the isql session with the quit command.