Discussion Locked

Starting and stopping NT4 services

0 helpful
7 replies
Closed to new repliesThis discussion is closed. It stays readable, but it takes no new replies.

We have an NT4 server which has the SQL Anywhere server installed. At present we manually stop the service when we leave at the end of the day so the backup (which starts at 10:00pm) can backup the database. It is then restarted in the morning.

How can we start and stop this service automatically? The only sheduler I can find is 'AT' which runs batch files and CMD files, but does not appear to deal with services (or does it?)

What do you suggest?

Thanks in advance

Andy

7 replies

by syscokid

You could create a batch file to net stop the SQL Anywhere service, and another to start it, and use AT to schedule those batch files.

What do you use for backup? I've heard in Arcserve you can configure it to do this for you.

by cactus pete

If you want to use AT, the command to stop a service looks like:

NET STOP "Service name"

Starting is just as easy:

NET START "Service name"

by nettek

You can stop and start services from a command line. To find which command to use for the SQL Anywhere service, run regedit and navigate to
HKEY_LOCAL_MACHINE\SYSTEM\CurrentControlSet\Services
Here you will find folders with the names of all the services of your server. It is the name of the folder that can start or stop a service.
For example
c:\net stop SqlAnywhere
You may use the AT command in conjunction with these command lines.

Also, most third-party backup software has the ability to execute commands when the backup job runs. For example, we use ArcserveIT, and we schedule a batch file that contains simple "NET STOP " commands to run when the backup job starts that will stop certain database applications so that the db can be backed up.

This discussion is closed to new replies.