Tek-Tips is the largest IT community on the Internet today!

Members share and learn making Tek-Tips Forums the best source of peer-reviewed technical information on the Internet!

  • Congratulations gkittelson on being selected by the Tek-Tips community for having the most helpful posts in the forums last week. Way to Go!

Automated Stop/Start of SQL Server

Status
Not open for further replies.

FaStOnE

Programmer
Jan 4, 2002
14
US
Is there a way to automate a nightly Stop/Start of the SQL Server? I'd like to schedule this as a nightly process just to "make sure" it cleans itself up. If so, can you show some examples of how to accomplish this?

Thanks!!

Rick
(Remember... 2 wrongs do not make a right! But, 3 rights make a LEFT!)
 
There is really no reason to do this. In fact, you are hurting your performance after the stop and restart because all the data that had been cached will have to be recached.

However if you really want to.

look at the net start sqlserver and net stop sqlserver commands in BOL. Remember you may need to start sql agent also.
 
Thanks for the response...

I agree with you... but I'm having some issues with an associated TomCat job working with our intranet. Seems as though I'm getting a memory leak somewhere that eventually affects the SQL Server. I honestly want to schedule a RESTART on the Server, but am trying to refrain from that feeling as much as possible.

Unfortunately, we haven't been able to find anything that hogs the memory and causes the eventual slowdown. Just trying to accomodate the situation.

Rick
 
Status
Not open for further replies.

Part and Inventory Search

Sponsor

Back
Top