After you configure the DirectConnect server, Sybase recommends that you add and start DirectConnect as a Windows service. For information on configuring, starting, and stopping the DirectConnect server, see the Sybase Enterprise Connect Data Access documentation available on the SyBooks CD for Sybase Replication, or the Sybase Product Manual Web site.
You can add DirectConnect as a Windows service by invoking the ServiceWrapper.exe available in the ServiceWrapper directory. This is available on the DI Suite installation media or in the directory where you have extracted the di_core.zip file.
Copy the ServiceWrapper.exe to your installation directory (%SYBASE%) and invoke:
%SYBASE%\ServiceWrapper.exe --install service_name --user=DOMAIN_NAME\username --password=password installation directory\DC-12_6\bin\DCStart.bat -Sserver_name
where:
service_name is the Windows service name.
username includes the domain name and the user name under which the service will run.
If your Windows machine is not a member of a Windows
domain, but is a Workgroup member instead, use the COMPUTER_NAME in
place of DOMAIN_NAME.
password is the password for the user name.
server_name is the name of the DirectConnect server you created earlier using the AddServer command. See “DirectConnect”.
For example:
C:\Sybase\ServiceWrapper.exe --install Syb_DCserver --user=SYBASE\jdoe --password=jdpassword c:\Sybase\DC-12_6\bin\DCStart.bat -SDCserver
You must specify the .bat suffix
for DCStart.
Select Start | Settings | Control Panel | Administrative Tools | Services. The Services window opens.
Select the name of the service you just installed. Right-click and select Properties. In the Properties dialog, select the Log On tab, and ensure “This Account” is selected. Verify that the user name is the same as the one you specified while adding the service.
Use the Recovery tab to specify any desired actions in case the service fails.
Use the General tab to provide a description of the service and to specify whether the service should start automatically or manually. Click Start to start the service.
You can use the ServiceWrapper.exe to remove the service using the following command:
%SYBASE%\ServiceWrapper.exe --uninstall service_name
where service_name is the name of the service.