cancel
Showing results for 
Search instead for 
Did you mean: 

noob question about Sybase service

Former Member
3,151

Why doesn't a service entry appear under (Control Panel -> Services) when I start a SQLanywhere database? I have tried local database and network database. A lightning bolt icon DOES appear on the sys tray at the bottom right of the desktop, but no service entry.

The "about Sybase" help screen says "DEVELOPER EDITION". Is this the reason?

We have Windows server 2008.

Thanks

Accepted Solutions (0)

Answers (2)

Answers (2)

MarkCulp
Participant

Note that you can start a database server (as a service) without starting a database but when you do this you minimally need to give the database server a name using the -n server switch (i.e. placing -n before any database name on the command line makes it a server switch as opposed to a database switch, i.e. -n and a few other switches can act as either server or database switches depending on their placement on the command line).

Example:

dbsvc -as -t Personal -w mydbservice dbsrv16 -n mydbservice


Your application then needs to start a database by connecting to the utility_db (a pseudo database that exists on all SQLA servers) and then issues the START DATABASE ... statement. Alternatively your application can autostart the database on the server by including the database file name (relative to the server) in the client's connection string. E.g.:

uid=myuser;pwd=mypassword;servername=mydbservice;dbf=/path-to-dbfile/mydbfile.db


Note that the connection string must contain the servername=... connection parameter so that the application connects to the correct database server (otherwise a database server will be autostarted)

HTH

Former Member
0 Kudos

Thanks MC.

I deleted the original service and created it again adding in the -n {servicename} under parameters, and it worked like a charm.

You guys are great!

VolkerBarth
Contributor

The SQL Anywhere database engine will only appear as a Windows Service if you define it to run as such.

If you start the database engine "normally", it will run as a normal application under the currently logged-in user. It does not matter if you use a paid or a developer edition, and it does not matter if you use the personal engine (dbeng12.exe) or the network server (dbsrv12.exe).

The further doc topics may help to make SQL Anywhere run as a Windows service (here for version 12.0.1):


Note: It's rather common to stumble over the different notion of "Windows service" and "Database server", the latter means just that this is the program that "serves" the database for you, in contrast to the database files themselves...

Former Member
0 Kudos

Hey, thanks VB. That worked. I now have a service running. 🙂

But, unfortunately, the service won't stay "Started". It keeps telling me that some services stop automatically when no program is using it. The reason I want to keep it started is to be able to install a piece of software for our telephone system to use. (The software needs an SQL type database to attach to)

My thinking now is that in order to keep the new service "started" and running, I will need to create a simple, dummy database for it to use.

But, when I create a database in Sybase Central->Tools->Create Database, the database once again opens as the lightning bolt on the system tray instead of starting and using the service.

Frustrating...

reimer_pods
Participant
0 Kudos

When you create a new database, SQLA automatically starts a personal server with a tool database to support the creation if the new database. IMHO this will never use an existing service.
The service, once created, should keep running, but it's possible, that a datebase that you started using this service will be stopped automatically, when there's no more connection using it.
In you want to keep that database running, either start the database with the service or make sure, that the database isn't stopped, after the last connection closed.