cancel
Showing results for 
Search instead for 
Did you mean: 

Run Arbiter as a service

0 Kudos

Hi Guys,

We have installed SQL Anywhere 16 as a cluster in our systems. We are using the mirroring settings to replicate the data from the primary DB to the secondary.

Everything works fine as expected. There is only one small issue i would like the experts help on.

I am creating Services for each of the Databases that are running on the system. We are using Windows.

I can create the services for the primary and secondary(mirror) databases fine and they work as expected.

Here are the service creation commands for Primary and secondary databases:

1. dbsvc -as -i -s auto -sd "The SQL Anywhere 16 Database Service" -t network -w SQLAnywhere16DB "F:\SAP\SQLAnywhere16\Bin64\dbsrv16.exe" -n ufs_mirror_server1 -x "tcpip(PORT=2639)" -su sql "F:\SAP\SQLAnywhereDBFiles\DB\smp3.db" -xp on

2. dbsvc -as -i -s auto -sd "The SQL Anywhere 16 Database Service" -t network -w SQLAnywhere16DB "F:\SAP\SQLAnywhere16\Bin64\dbsrv16.exe" -n ufs_mirror_server2 -x "tcpip(PORT=2639;DOBROAD=no)" -su sql "F:\SAP\SQLAnywhereDBFiles\DB\smp3.db" -xp on

I can create a service with the specific settings for the Arbiter. Although, when I try to start the service, i get an error from windows saying that "the service started and stopped because it is not used by any process."

Here is the command i use for the arbiter service creation:

dbsvc -as -i -s auto -sd "The SQL Anywhere 16 Arbiter Database Service" -t network -w SQLAnywhere16DBArbiter "F:\SAP\SQLAnywhere16\Bin64\dbsrv16 -n ufs_arbiter -x "tcpip(PORT=2640;DOBROAD=no)" -xf "F:\\SAP\\SQLAnywhereDBFiles\\DB\\arbiter.state" -xa "AUTH=ufsmirror;DBN=smp3"

When i use the dbrv16 command to start the network server that runs the Arbiter it starts just fine and i can see the connections established between the 2 systems. Although, i want this to start as a service so it can run all the time on the OS.

Can anyone help me identify the issue?

Here is the issue as displayed on the event viewer:

Accepted Solutions (1)

Accepted Solutions (1)

former_member244518
Participant
0 Kudos

Hi George,

You are missing a terminating quote mark after the executable name.


dbsvc -as -i -s auto -sd "The SQL Anywhere 16 Arbiter Database Service" -t network -w SQLAnywhere16DBArbiter "F:\SAP\SQLAnywhere16\Bin64\dbsrv16" -n ufs_arbiter -x "tcpip(PORT=2640;DOBROAD=no)" -xf "F:\\SAP\\SQLAnywhereDBFiles\\DB\\arbiter.state" -xa "AUTH=ufsmirror;DBN=smp3"

Does the above command create the service correctly?

Thanks,

Mikel

0 Kudos

Hi Mikel,

On which quote you are referring?

I have just tried using your updated command and still get the same error.

Thanks!!

George Lazaridis

former_member244518
Participant
0 Kudos

Hi George,

The original command didn't have a quote after the dbsrv16 part.

Compare:

"F:\SAP\SQLAnywhere16\Bin64\dbsrv16.exe" <... params>

in your other commands to:

"F:\SAP\SQLAnywhere16\Bin64\dbsrv16.exe <... params>

in your arbiter.

If you open regedit.exe and navigate to HKLM\System\CurrentControlSet\Services\SQLANYs_SQLAnywhere16DBArbiter, what are the values of the ImagePath and Parameter keys?

All the parameters you provided should be in the Parameter key, not the ImagePath one.

Thanks,

Mikel

0 Kudos

Hi Mikel,

Very good catch here with the quote. That's was missing. I have created the service, started it and its working fine. I can see n Sybase central the arbiter connected to the mirroring system just fine.

Good Stuff.

Thanks a lot!!

former_member244518
Participant
0 Kudos

Glad it's working now! Let us know if you run in to any more problems.

Sybase Central also has a view to create and edit services, although it wouldn't be script-able like the dbsvc commands

Creating Windows services (Sybase Central)

Answers (0)