Batch restart MS SQL

if you need to reboot SQL server in Windows server(or local machine) and want to do this quickly on the server, login and create a batch file with the following parameters: (change mssqlserver for the server instance name you have)

 

net stop mssqlserver
net start mssqlserver
net start SQLSERVERAGENT
pause

save the file as “rebootSQLServer.bat”