A small question:
How do we delay starting dbremote until the dbsrv10 is ready to accept requests ?
We have setup dbeng10 and dbremote to start in the correct order as services in linux (Ubuntu 10.04.2 LTS). But when the system boots, dbeng10 is started correctly, but the server takes 5-10 seconds until it's ready to accept requests.
The dbremote process is started directly after dbeng10 and then fails with a connection error (because the db is not yet ready...)
Is there a way to delay the start of dbremote until the database server is ready ?
Until now we just did put a "sleep 20" in the start of the dbremote service, but this then also delays starting all other services by 20 seconds.... :(
asked 23 Jun '11, 06:05
Have a look at the RetryConnectionTimeout connection parameter. You should be able to set it to a reasonable value and
Note that you probably don't want to wait indefinitely in case your database server never does successfully start for some reason.
Use the dbsvc -rs <dep> switch to specify the SA server service name when you define your dbremote service name. This will tell Linux to not start the dbremote service until the SA server service has been started.
Alternatively you could edit the dbremote service definition in /etc/init.d to specify a dependency of your deremote service on your SQL Anywhere server service. E.g. add the name of your SA server service to the Required-Start comment line near the top of the init.d file. After making the change to the service file you will need to tell Linux to "shuffle" the start and stop order. How you do this depends on the Linux distro - e.g. use chkconfig or update-rc.d