• Status: Solved
  • Priority: Medium
  • Security: Public
  • Views: 373
  • Last Modified:

Configure Task Scheduller under windows 2003 server to reestart SQL Server Express every morning


I need guidance on how to setup a task schedulled to run every morning and reset my instance of sql server express.

As you might as why, here is the answer:

I run a dedicated server at godaddy and every night when they run the Netbackup utility from Veritas, if anybody tries to acess a website during the backup process, sql server will disconnect the website's database and I have to reestart sql server express to get them running again.

I already spoke to tech support and they said theres nothing they can do about it and suggested that I create an application to put the websites under maintenance mode during the backup process (every night) or create a schedulled task to reestart the server every morning, after the backup takes place.

I think the second choice is the best and I need guidance for that.


1 Solution
Raja Jegan RSQL Server DBA & ArchitectCommented:
Go to services.msc and find the exact names as it displays over there and replace it if required in the below script.


Have the above piece of code in a *.bat file and use Windows Task scheduler to run it at scheduled intervals..

Featured Post

Free Tool: Path Explorer

An intuitive utility to help find the CSS path to UI elements on a webpage. These paths are used frequently in a variety of front-end development and QA automation tasks.

One of a set of tools we're offering as a way of saying thank you for being a part of the community.

Tackle projects and never again get stuck behind a technical roadblock.
Join Now