How is possible to create the ASA service without Central?
It is documented in the sybase docs. There are excellent command line tools available in ./sybase_db.
You can find it in the pdf dbdaen9.pdf starting at page 24.
lcr159:
How is possible to create the ASA service without Central?
For the Windows platform we have one bat file that adds both Servoy Application Server and Sybase ASA as Windows services and another bat file that removes them.
The following shows the contents of our InstallServices.bat file which:
(1) stops Sybase ASA if running as an application,
(2) installs and starts Servoy Application Server and Sybase ASA as Windows services, and
(3) displays 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 shows the contents of our RemoveServices.bat file which:
(1) removes Servoy Application Server and Sybase ASA as Windows services, and
(2) displays 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
To make this work we had to create a “win32” subfolder within our “sybase_db” folder that contains:
dbbackup.exe 100kb
dblgen9.dll 572kb
dblib9.dll 440kb
dbsvc.exe 112kb
dbtool9.dll 1,052kb
Our sybase.config file looks like this:
-ti 0 -x tcpip{dobroadcast=no} -qs -qw -o C:/PROGRA~1/Servoy/sybase~1/sybase_log.txt
C:/PROGRA~1/Servoy/database/servoy_repository.db
C:/PROGRA~1/Servoy/database/log_data.db
C:/PROGRA~1/Servoy/database/contacts.db
C:/PROGRA~1/Servoy/database/updates.db
The contents of our wrapper.conf file includes settings that bring Servoy Application Server to the top of the Windows services list adjacent to Sybase ASA (insertion of the underline character in front of the displayname is what achieves this - see below), adds a dependency on Sybase ASA and sets the service to run as “Automatic” so that it will restart whenever Windows restarts (above install code does same for Sybase ASA). The bottom of the contents of our wrapper.conf file looks like this:
# 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
As of this writing we have found the above to work with Windows XP, 2000, and 2003 Server. However, please note that using the path syntax shown above appears to be very important in order for this to work on different flavors of Windows.
Try at your own risk.
Dean Westover
(see our Servoyworld session this Wednesay 8:30am
“Hosting Your Product as a Service Over the Internet”,
featuring our new “multi-company” webclient solution)