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

Hello,

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.

Thanks!

Eder
EderwainerAsked:
Who is Participating?
I wear a lot of hats...

"The solutions and answers provided on Experts Exchange have been extremely helpful to me over the last few years. I wear a lot of hats - Developer, Database Administrator, Help Desk, etc., so I know a lot of things but not a lot about one thing. Experts Exchange gives me answers from people who do know a lot about one thing, in a easy to use platform." -Todd S.

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

net stop MSSQLSERVER
net start MSSQLSERVER

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

Experts Exchange Solution brought to you by

Your issues matter to us.

Facing a tech roadblock? Get the help and guidance you need from experienced professionals who care. Ask your question anytime, anywhere, with no hassle.

Start your 7-day free trial
It's more than this solution.Get answers and train to solve all your tech problems - anytime, anywhere.Try it for free Edge Out The Competitionfor your dream job with proven skills and certifications.Get started today Stand Outas the employee with proven skills.Start learning today for free Move Your Career Forwardwith certification training in the latest technologies.Start your trial today
Windows Server 2003

From novice to tech pro — start learning today.