How to restart SQl server automatically
Posted on 2010-08-27
I need a batch file or a script that can automatically start/stop SQL server (default instance), once every day. I tried "net stop mssqlserver", but when the batch file executes it ask for user input for yes/no, etc. I assume I need to add some switches..
I need to do this to clrear the tempdb once a day... because it's growing too big , and I don't have time to trace the problem.