Discussion Locked

Remotely stop/start NT services

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

I wish to schedule a backup an SQL 7 database from another PC. I need to stop some of the SQL services (mssqlserver & sqlexecutive), then backup the databases and then re-start the services. How can I do this from another NT system running the backup device?

At the moment I use the NT Task Schedular to run a batch file (cmd) which in turn runs NT Server Backup. I just need the commmand for for remotely stopping/starting services.

Thanks for any help

9 replies

by dc1

Use Server Manager. Highlight the server name and from the menu choose Computer and then services. As long as you have the necessary rights to stop and start services you will be able to do so.

by simonchan

Windows NT Server 4.0 Resource Kit Supplement 1, comes with two new administrative utilities to work remotely with Windows NT services.

The new utilities are:

Sc.exe: This tool provides a way to communicate with Service Controller (Services.exe) from the command prompt, to retrieve information about services.

Netsvc.exe: This tool provides a way to remotely start, stop, and query the status of services from the command line.

Please consult the Windows NT Server 4.0 Resource Kit, Supplement 1, for additional information on the syntax and use of Sc.exe and Netsvc.exe.

by allan

If you have an idea how long the backup takes you can use the "AT" command and run a bat file . This bat file would be net stop \\server\service. Again use the AT command to run a second bat file for net start \\server\service after the backup completes.

by oliver.buckie

I have this solution in place at the moment - in fact I use the Task Scheduler service which comes off one of the resource kits

by mteff

Just as a suggestion, why not through SQL Server manager, use the Database backup ability. It writes the database out as a file, that you can backup to tape.

In SQL Server Manager, under the Database Folder, right click on your database, select all tasks, then backup database. For the destination, you will need to give location and file name.

This discussion is closed to new replies.