Sybase Central - is it necessary?

Is Sybase central necessary to run the database as a service?

I’m having tremendous difficulty downloading the 9.01 edition from Sybase. I’ve got the link but the download is painfully slow and keeps stopping halfway - and I’ve tried from a number of computers on a couple of different networks.

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?

MerMer

Hi MerMer,

When you want to ‘play’ with Sybase ASA the answer is yes. Installing Sybase as a service can be done throught command line but you have to dig into the sybase docs and start the correct commands from within the Servoy Sybase folder.

I don’t know the correct commands but it is not too difficult.

Cheers,

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.

Westy,

Many thanks - I’ve downloaded your files.

MerMer

Hi again, Dean (and everybody),

I tried using the method above for Servoy 3.5 with Sybase 10, substituting the version 9 files with those of the new version, and I don’t succeed. I get an error, saying:

Could not start _Servoy Application Server service on Local Computer - Error 1075: The dependency service does not exist or has been marked for deletion.

when I try to start the Servoy Server service manually. Sure enough, both newly installed services do not show a dependency to each other, which they did before… :?

Situation: On a machine with a previous installation, I removed the old services with the batch file, restarted the machine, installed the final version of Servoy 3.5, checked to make sure the wrapper.conf file had the correct lines at the end, tried to install with the other batch file, but it doesn’t work. The only change I made is I copied the version 10 files to the Win32 subfolder, instead of the version 9 files, and I also changed

ASASERVICE C:\PROGRA~1\Servoy\sybase~1\dbsrv9.exe

with

ASASERVICE C:\PROGRA~1\Servoy\sybase~1\dbsrv10.exe

in the installation batch file.

The problem might be stemming from the fact that this is an upgrade from version 3.5rc3 to final, but I don’t think that should prevent the services to be correctly installed and started. :?

Any ideas on what I’m doing wrong?

Sincerely,

Ben

OK, flushed everything and did a clean install of Servoy 3.5 final. Followed Westy’s instructions to the letter, and after several attempts, I am able to install and remove both services (with the correct dependencies) using the batch files (I got fed up, so I copied the entire SQL Anywhere 10 win32 folder under the sybase_db folder). Woohoo! :)

So far so good, now I get an error message saying

Could not start _Servoy Application Server service on Local Computer - Error 1068: The dependency service or group failed to start.

And as a matter of fact, my Sybase service refuses to start by itself, giving me an

Error 127: The specified procedure could not be found.

The SQL Anywhere v10 docs have a command line that’s a little different than the one in the previous post:

Create a personal server service called myserv, which starts the specified server with the specified parameters. The server runs as the LocalSystem user:

dbsvc -as -w myserv “c:\Program Files\SQL Anywhere 10\win32\dbeng10.exe” -n myeng -c 8m “c:\temp\mysample.db”

Is the ‘mysample.db’ parameter of significance, compared to the ‘sybase.config’ file the batch file points to? I’m grasping at straws, here… :(

Thanks for all your help,

Ben

LOGIsoft:
Hi again, Dean (and everybody),

I tried using the method above for Servoy 3.5 with Sybase 10, substituting the version 9 files with those of the new version, and I don’t succeed. I get an error…

Hi Ben,

We have not moved up to Servoy 3.5 with Sybase 10 yet, so I am not able to help you.

Dean

Thanks Dean. Does anyone else have any tips/experience with this issue? I’m open to suggestions… :idea:

Ben

After much trial and error, I was finally able to install and start the SQL Anywhere service manually using Sybase Central v10 - it turns out that the extra ’ -n myeng -c 8m ’ bit in the parameters screen prevented the service from starting. I suspect that these come from my batch file install, so I’m not going to touch this for a while, until someone can help me figure out what to do to make the .bat files behave as with iAnywhere v9.

I still think all of this is less than straigthforward and requires a lot of hit-and-miss, but I won’t complain if it works - it would sure be fun if someone were to streamline all of these procedures ‘a la Dean’, though… :)

Fingers crossed,

Ben