Wednesday, May 3, 2017

how to restart Sql service using Batch File


1.Open a new text file from notepad. type the following commands in the text file
2.Save the file as RestartSql.bat on to your desktop
3.whenever you want to restart your Sql Service...just double click the RestartSql.bat on ur desktop

********************************************************************************

net stop "SQL Server Agent (MSSQLSERVER)"
net stop MSSQLSERVER
net start MSSQLSERVER
net start "SQL Server Agent (MSSQLSERVER)"

*******************************************************************************

No comments: