?
Solved

how to write scheduled task to stop/start sqlwriter sbs 2011 backup

Posted on 2014-09-06
3
Medium Priority
?
460 Views
Last Modified: 2014-09-11
Hi,

I want to setup 2 scheduled task to stop/start sqlwriter

The syntax is:
net stop sqlwriter
net start sqlwriter

These task will be executed before and after a daily backup

I'm not sure as to how to write a scheduled task for this purpose.

Thanks in advance,
Isaac
0
Comment
Question by:TechIsaac
[X]
Welcome to Experts Exchange

Add your voice to the tech community where 5M+ people just like you are talking about what matters.

  • Help others & share knowledge
  • Earn cash & points
  • Learn & ask questions
  • 2
3 Comments
 
LVL 29

Accepted Solution

by:
becraig earned 2000 total points
ID: 40307797
How is the backup being run ?

I would suggest one scheduled task that runs:
net stop sqlwriter
Run backup step
net start sqlwriter

Here is a previously answered question on scheduling a task.  (you can specify username if you are able to user a command line sql tool for backup)

 schtasks /Create /tn Servicecheck /S %a /tr c:\temp\file.bat /SC DAILY /RL

More info on the schtask command:
http://msdn.microsoft.com/en-us/library/windows/desktop/bb736357%28v=vs.85%29.aspx
0
 

Author Comment

by:TechIsaac
ID: 40310917
The backup is scheduled to run nightly via the backup utility.

Can I schedule a batch file via the task scheduler on the server (control panel)

I want to stop the service at 9pm , run the backup at 11pm daily and
start the service at 7am

Thanks,
Isaac
0
 
LVL 29

Expert Comment

by:becraig
ID: 40310927
Here is a very easy walkthrough:
http://clickhome.freshdesk.com/support/articles/107608-how-to-setup-windows-auto-scheduler-task-to-restart-clickhome-windows


This includes the creation of the batch file, which in your instance you will create two tasks one to start the service and one to stop it.
0

Featured Post

Prepare for your VMware VCP6-DCV exam.

Josh Coen and Jason Langer have prepared the latest edition of VCP study guide. Both authors have been working in the IT field for more than a decade, and both hold VMware certifications. This 163-page guide covers all 10 of the exam blueprint sections.

Question has a verified solution.

If you are experiencing a similar issue, please ask a related question

In this post we will learn how to make Android Gesture Tutorial and give different functionality whenever a user Touch or Scroll android screen.
Backups and Disaster RecoveryIn this post, we’ll look at strategies for backups and disaster recovery.
This tutorial will walk an individual through the process of configuring basic necessities in order to use the 2010 version of Data Protection Manager. These include storage, agents, and protection jobs. Launch Data Protection Manager from the deskt…
Introduction to Processes

764 members asked questions and received personalized solutions in the past 7 days.

Join the community of 500,000 technology professionals and ask your questions.

Join & Ask a Question