469,167 Members | 1,453 Online
Bytes | Developer Community
New Post

Home Posts Topics Members FAQ

Post your question to a community of 469,167 developers. It's quick & easy.

backups

I am in search of a simple .bat file or .vbs script that I can use to
stop my SQL database server. I am looking to schedule a script of sorts
to initiate at a certain time every day. This script needs to be able to
stop my server and/or initiate a backup. The script should be able to be
ran remotely from the lan. can anyone help me?

*** Sent via Developersdex http://www.developersdex.com ***
Don't just participate in USENET...get rewarded for it!
Jul 20 '05 #1
1 3286

"jeff wilmoth" <je**********@yahoo.com> wrote in message
news:40***********************@news.frii.net...
I am in search of a simple .bat file or .vbs script that I can use to
stop my SQL database server. I am looking to schedule a script of sorts
to initiate at a certain time every day. This script needs to be able to
stop my server and/or initiate a backup. The script should be able to be
ran remotely from the lan. can anyone help me?
First question, why not use the online backup capabilities of SQL Server?

In any case, a simple

NET STOP MSSQLSERVER

and

NET START MSSQLSERVER

will stop and start SQL Server

If you have SQL Server Agent running, you can either do:

NET STOP SQLSERVERAGENT
NET STOP MSSQLSERVER

or

NET STOP MSSQLSERVER /Y

And then to start either

NET START MSSQLSERVER
NET START SQLSERVERAGENT

or simply

NET START SQLSERVERAGENT

which should start SQL Server first.

*** Sent via Developersdex http://www.developersdex.com ***
Don't just participate in USENET...get rewarded for it!

Jul 20 '05 #2

This discussion thread is closed

Replies have been disabled for this discussion.

Similar topics

reply views Thread by Bill Gates | last post: by
reply views Thread by JJ | last post: by
1 post views Thread by Sgt. Sausage | last post: by
1 post views Thread by Loopy | last post: by
2 posts views Thread by greggarpin | last post: by
3 posts views Thread by db2inst2 | last post: by
21 posts views Thread by Dennis Gearon | last post: by
6 posts views Thread by frank78 | last post: by
1 post views Thread by Polani | last post: by
1 post views Thread by CARIGAR | last post: by
reply views Thread by zhoujie | last post: by
1 post views Thread by Mortomer39 | last post: by
By using this site, you agree to our Privacy Policy and Terms of Use.