on 2012 Dec 03 5:53 PM
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!
Request clarification before answering.
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 C:\\ProgramData\\MyApp\\Database\\History.db
Then change your connection strings to reference the database name rather than the file:
mydatabase.db:
currentDB = new SAConnection(DBN=mydatabase;EngineName=MyDatabase;UID=dba;pwd=sql)
history.db:
historyDB = new SAConnection(DBN=History;EngineName=MyDatabase;UID=dba;pwd=sql)
You must be a registered user to add a comment. If you've already registered, sign in. Otherwise, register and sign in.
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.
User | Count |
---|---|
52 | |
6 | |
5 | |
5 | |
5 | |
4 | |
3 | |
3 | |
3 | |
3 |
You must be a registered user to add a comment. If you've already registered, sign in. Otherwise, register and sign in.