General discussion

Locked

SQL Services

By tgurr ·
I'm attempting to get a schedule to stop and start the services on our SQL server so that the backup at night doesn't skip the database.

Any Ideas? Help

This conversation is currently closed to new comments.

5 total posts (Page 1 of 1)  
| Thread display: Collapse - | Expand +

All Comments

Collapse -

SQL Services

by Joseph Moore In reply to SQL Services

Make a BAT file (call it STOP.BAT) that contains the following single line in text:

NET STOP MSSQLSERVER


And then make a 2nd BAT file (call it START.BAT) that reads the following:

NET START MSSQLSERVER


Schedule the Stop file to run before your backup runs. When your backup should be done, then schedule the Start file to run.

hope this helps

Collapse -

SQL Services

by tgurr In reply to SQL Services

The question was auto-closed by TechRepublic

Collapse -

SQL Services

by jmiller1 In reply to SQL Services

Take note that stopping the MSSQLServer service will also stop the SQLServerAgent service. You will need to restart this service as well. A better strategy is to backup your databases from within SQL Server (Using the 'BACKUP DATABASE' statements)and letting your nightly backup pick up these files. This will eliminate server downtime, and in the event your server crashes, you will be able to restore the databases using 'RESTORE DATABASE', rather than stored procedures to re-attach the database (which can create problems if the server is not shut down properly in case of a crash). Hope that helps!

Collapse -

SQL Services

by tgurr In reply to SQL Services

The question was auto-closed by TechRepublic

Collapse -

SQL Services

by tgurr In reply to SQL Services

This question was auto closed due to inactivity

Back to Desktop Forum
5 total posts (Page 1 of 1)  

Related Discussions

Related Forums