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.


Who is Participating?
Dan_StewartConnect With a Mentor Commented:
try this:

Create a batchfile and put one of the following lines in it

net start servicename
net stop servicename

When you set up the task browse to the batch file and select it

to find out the servicename, right click my computer, select manage, browse
down to services.
Select the service you want and right click and select propertites, you will
see servicename and displayname
use the service name the display name is only for human readability,
sometimes they are the same and sometines they aren't.
net stop "SQL Server (SQLEXPRESS)"
net start "SQL Server (SQLEXPRESS)"
Question has a verified solution.

Are you are experiencing a similar issue? Get a personalized answer when you ask a related question.

Have a better answer? Share it in a comment.

All Courses

From novice to tech pro — start learning today.