Please be aware that the content in SAP SQL Anywhere Forum will be migrated to the SAP Community in August and this forum will be retired.

Hi, I having trouble getting dbsvc12.exe to run on Wnidows 7 32-bit and 64-bit systems.

I created a service on Windows XP with the following command and my program connects to my SQL Anywhere database just fine: I can manually start/stop the service from the services panel without a problem.

:sc create MyService start= auto binPath= "C:Program FilesSQL Anywhere 12Bin32dbsrv12.exe " DisplayName= "My Service Database Service"

but when I create the service with the EXACT same statement on Windows 7, I get the following error:

"Windows could not start the My Service Database Service on Local Computer. Error 1053: The service did not respond to the start or control request in a timely fashion."

I tried using the SQL Anywhere DbSvc utility, but then I get an error in my applcation "SQL Anywhere .NET Data Provider : Request to start/stop database denied (-75)"

Any help would greatly be appreciated!

asked 03 Dec '12, 17:53

bac's gravatar image

accept rate: 0%

Did you try creating the service with the Services Wizard from Sybase Central?

(03 Dec '12, 18:07) Derli Marcochi

Yes, with same results.

(03 Dec '12, 18:13) bac

How have you defined the fields in the Configuration tab from the wizard?

(03 Dec '12, 18:17) Derli Marcochi

Well that's just it: for Windows XP I didn't have to setup the server via Sybase Central, but when I did setup via Sybase Central on windows 7 then I got the error -75 command the parameters were:

-x tcpip -c 8m c:\programdata\myapp\Database\mydatabase.db

(03 Dec '12, 18:27) bac

Sounds like the dbsvc tool successfully created a service, since your application was able to connect to the server. I'd go back to that option and then we can diagnose the connection problem. Can you post your connection string?

(03 Dec '12, 19:53) Graeme Perrow

While I don't like the way the dbsvc names the service (it prepends SQLAnys_ ) to the name you provide. If this is the only way to get it to work with Windows 7, so be it.

A little background on my application. I actually have 2 databases that it connects to: mydatabase.db and history.db. Both have the exact same schema and tables, etc. In obtaining the connection string, I discovered that the connection to mydatabase.db is succesful. The failure is upon attempting the connection on the history.db. Here is the connection string for each:


currentDB = new SAConnection(DatabaseFile=C:ProgramDataMyAppDatabasemydatabase.db;EngineName=MyDatabase;Start=C:Program FilesSQL Anywhere 12bin32dbsrv12.exe -x none -gd all -c 14M -ch 256M;UID=dba;pwd=sql;)


historyDB = new SAConnection(DatabaseFile=C:ProgramDataMyAppDatabaseHistory.db;EngineName=MyDatabase;Start=C:Program FilesSQL Anywhere 12bin32dbsrv12.exe -x none -gd all -c 14M -ch 256M;UID=dba;pwd=sql;)

When I validate the connection,

currentDB.Open(); is successful hsitoryDB.Open(); fails ServerVersion = 'historyDB.ServerVersion' threw an exception of type 'System.InvalidOperationException'

(04 Dec '12, 14:38) bac

forgot to add last line to previous comment: Then it throws an SAException: 'Request to start/stop database denied', errorcode: -75.

(04 Dec '12, 16:28) bac

I'm a little puzzled by the connection strings: if you've already created a service for the network server, why do you use a start command for the server engine? Or haven't you been able to create the services successfully?

Wrt the error message: to start a database on a network server engine requires DBA authority (for existing connections using START DATABASE) or the engine parameter "-gd all" (cf. -gd server option ). You might also want to add "-n <engname>" to your service command.

(05 Dec '12, 04:01) Reimer Pods
More comments hidden
showing 5 of 8 show all flat view

Create the service so that it runs both databases:

dbsvc ... C:\Program Files\SQL Anywhere 12\bin32\dbsrv12.exe -n MyDatabase -x none
    -gd all -c 14M -ch 256M C:\ProgramData\MyApp\Database\mydatabase.db

Then change your connection strings to reference the database name rather than the file:


currentDB = new SAConnection(DBN=mydatabase;EngineName=MyDatabase;UID=dba;pwd=sql)


historyDB = new SAConnection(DBN=History;EngineName=MyDatabase;UID=dba;pwd=sql)

permanent link

answered 05 Dec '12, 07:58

Graeme%20Perrow's gravatar image

Graeme Perrow
accept rate: 54%

Thanks for you answer. I didn't realize you could specify 2 databases with dbsvc. That would work for services created with dbsvc. But, I also figured out how to make it work with a service create with Microsoft's sc command. When looking at the service created by dbsvc, I noticed that it created a "Parameters" key that listed the parameters for the service. So, I added the following parameters (-n mydatabase -c 14M -ch 256M -x none -gd all -gp 4096)to my service and the access to both databases works as it does in XP.

(05 Dec '12, 16:33) bac
Your answer
toggle preview

Follow this question

By Email:

Once you sign in you will be able to subscribe for any updates here



Answers and Comments

Markdown Basics

  • *italic* or _italic_
  • **bold** or __bold__
  • link:[text]( "title")
  • image?![alt text](/path/img.jpg "title")
  • numbered list: 1. Foo 2. Bar
  • to add a line break simply add two spaces to where you would like the new line to be.
  • basic HTML tags are also supported

Question tags:


question asked: 03 Dec '12, 17:53

question was seen: 3,178 times

last updated: 05 Dec '12, 16:33