MerMer:
Is Sybase central necessary to run the database as a service?
Certain files from Sybase central are necessary. After extensive trial and error I found that I can run Sybase as a Windows service by placing the following files in a “win32” folder at: C:\Program Files\Servoy\sybase_db\win32
dbbackup.exe (100kb)
dblgen9.dll (571kb)
dblib9.dll (440kb)
dbsvc.exe (112kb)
dbtool9.dll (1,052kb)
I have just placed them in a zip file at: http://66.105.190.195/win32/win32.zip
I have also included a copy of my wrapper.conf file from the service folder and my sybase.config file from the sybase_db folder.
The following bat file: (1) stops Sybase from running as an application, (2) starts both Services, and (3) displays them at the top of the Windows services window.
C:\PROGRA~1\Servoy\sybase~1\dbstop -c uid=DBA;pwd=SQL;eng=servoy_repository
C:\PROGRA~1\Servoy\service\Wrapper.exe -i C:\PROGRA~1\Servoy\service\wrapper.conf
C:\PROGRA~1\Servoy\sybase~1\win32\dbsvc.exe -s automatic -as -w ASASERVICE C:\PROGRA~1\Servoy\sybase~1\dbsrv9.exe -n myeng -c 8m @C:\PROGRA~1\Servoy\sybase~1\sybase.config
C:\PROGRA~1\Servoy\service\Wrapper.exe -t C:\PROGRA~1\Servoy\service\wrapper.conf
%SystemRoot%\system32\services.msc /s
The following bat file: (1) removes both services and (2) displays the Windows services window:
C:\PROGRA~1\Servoy\service\Wrapper.exe -r C:\PROGRA~1\Servoy\service\wrapper.conf
C:\PROGRA~1\Servoy\sybase~1\win32\dbsvc.exe -x ASASERVICE
C:\PROGRA~1\Servoy\sybase~1\win32\dbsvc.exe -y -d ASASERVICE
%SystemRoot%\system32\services.msc /s
Use of short path names within the sybase.conf file is particularly important if you want it to work with all versions of Windows XP, Windows 2000, and 2003 Server. Pay particular attention to the use of “sybase~1” in the sybase.conf file. Using sybase_db may break things because it contains too many letters. A pitfall that I have run into occasionally when using shortnames is if someone unexpectedly duplicates a folder such that the first letters of both folders end up having the exact same characters - this can lead to unexpected results.
The bottom section of our wrapper.conf file reads:
#********************************************************************
# Wrapper NT Service Properties
#********************************************************************
# WARNING - Do not modify any of these properties when an application
# using this configuration file has been installed as a service.
# Please uninstall the service before modifying this section. The
# service can then be reinstalled.
# Name of the service
wrapper.ntservice.name=ServoyService
# Display name of the service
wrapper.ntservice.displayname=_Servoy Application Server
# Description of the service
wrapper.ntservice.description=
# Service dependencies. Add dependencies as needed starting from 1
wrapper.ntservice.dependency.1=ASANYe_ASASERVICE
# Mode in which the service is installed. AUTO_START or DEMAND_START
wrapper.ntservice.starttype=AUTO_START
# Priority at which the service is run. NORMAL, LOW, HIGH, or
# REALTIME
wrapper.ntservice.process_priority=NORMAL
# Allow the service to interact with the desktop.
wrapper.ntservice.interactive=false
Notice the underline character in front of the display name as “_Servoy Application Server”. This brings the service to the top of the Windows services window where it can be easily seen without having to scroll.
MerMer:
As soon as I log out of the Windows Server, the DB process stops, the Servoy application server stops and the servoy clients cannot connect. I am presuming that in order to correct this I need to run the DB as a service - but this is dependent on Sybase Central - or is it?
In the above wrapper.conf notice the “ASANYe_ASASERVICE” dependency setting and the starttype “AUTO-START”.
Use at you own risk. The above works for us.