473,326 Members | 2,012 Online
Bytes | Software Development & Data Engineering Community
Post Job

Home Posts Topics Members FAQ

Join Bytes to post your question to a community of 473,326 software developers and data experts.

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 3364

"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 thread has been closed and replies have been disabled. Please start a new discussion.

Similar topics

0
by: Bill Gates | last post by:
i have two servers this is happenning on. each has a maintenance plan with the same options selected... General Tab - applies to all databases Optimizations Tab - reorganize data and index...
0
by: JJ | last post by:
I'm trying to create a backup set which maintains only a fixed number of days. As such, I've got the following script: BACKUP DATABASE to WITH NOINIT, NOUNLOAD, NAME=N'My Database Backup',...
1
by: Sgt. Sausage | last post by:
I've got a server (SQL 2K, Win2K) where the backups have started running long. The database is a bit largish -- 150GB or so. Up until last month, the backups were taking on the order of 4 to 5...
1
by: Loopy | last post by:
I'm trying to create a backup set which maintains only a fixed number of days. As such, I've got the following script: BACKUP DATABASE to WITH NOINIT, NOUNLOAD, NAME=N'My Database Backup',...
2
by: greggarpin | last post by:
Hi All. I'm currently maintaining 4 servers - 1 for public/customers and 3 for backups, development, etc... I regularly backup the entire SQL database for our public server and restore it on...
3
by: db2inst2 | last post by:
Hi all, When doing a restore using control center, i see the backups that are no longer existing. That i physically deleted. Is there a specific way to deleted the backups? Should i...
21
by: Dennis Gearon | last post by:
Along with backing up of my site, what files in 'pgdata' dir should I back up? ---------------------------(end of broadcast)--------------------------- TIP 2: you can get off all lists at once...
6
by: frank78 | last post by:
Hi everyone, I am having a little bit of trouble backing up some mySQL tables. I've been trying to adapt a script I found on the internet at...
1
by: Polani | last post by:
Hi Guys , I am taking DB2 Online backups through TSM API daily. When i check the database configuration parameters , it shows me " Number of database backup verions to maintain"= 12. This is...
11
by: RoB | last post by:
Hi all, I'm coming from the Informix world and I have a customer using DB2 8.2.3 for Linux on Red Hat Enterprise ES. The customer is performing filesystem backups of the containers etc every...
0
by: DolphinDB | last post by:
Tired of spending countless mintues downsampling your data? Look no further! In this article, you’ll learn how to efficiently downsample 6.48 billion high-frequency records to 61 million...
0
by: Vimpel783 | last post by:
Hello! Guys, I found this code on the Internet, but I need to modify it a little. It works well, the problem is this: Data is sent from only one cell, in this case B5, but it is necessary that data...
0
by: ArrayDB | last post by:
The error message I've encountered is; ERROR:root:Error generating model response: exception: access violation writing 0x0000000000005140, which seems to be indicative of an access violation...
1
by: PapaRatzi | last post by:
Hello, I am teaching myself MS Access forms design and Visual Basic. I've created a table to capture a list of Top 30 singles and forms to capture new entries. The final step is a form (unbound)...
1
by: CloudSolutions | last post by:
Introduction: For many beginners and individual users, requiring a credit card and email registration may pose a barrier when starting to use cloud servers. However, some cloud server providers now...
1
by: Defcon1945 | last post by:
I'm trying to learn Python using Pycharm but import shutil doesn't work
0
by: af34tf | last post by:
Hi Guys, I have a domain whose name is BytesLimited.com, and I want to sell it. Does anyone know about platforms that allow me to list my domain in auction for free. Thank you
0
by: Faith0G | last post by:
I am starting a new it consulting business and it's been a while since I setup a new website. Is wordpress still the best web based software for hosting a 5 page website? The webpages will be...
0
isladogs
by: isladogs | last post by:
The next Access Europe User Group meeting will be on Wednesday 3 Apr 2024 starting at 18:00 UK time (6PM UTC+1) and finishing by 19:30 (7.30PM). In this session, we are pleased to welcome former...

By using Bytes.com and it's services, you agree to our Privacy Policy and Terms of Use.

To disable or enable advertisements and analytics tracking please visit the manage ads & tracking page.