Restart MSSQL server instance

  • Restart MSSQL server instance using NET START/STOP.
  • Plan job for automaticall restart using plan
:: 	CREATED BY BOROVEC
::	restarting MSSQL serverices

::      c:\RestartSQLServer.bat
@ECHO OFF
NET STOP SQLSERVERAGENT
NET STOP MSSQLSERVER
NET START MSSQLSERVER
NET START SQLSERVERAGENT

:: 	for every day at 23:00 clock use in cmd: 
at 23:30 /every:M,T,W,Th,F,S,Su c:\RestartSQLServer.bat
::	CZ:	at 23:30 /every:Po,Út,St,Čt,Pá,So,Ne c:\RestartSQLServer.bat

::	to romove use:
at #id /delete	or	at /delete - to remove all
programming/mssql/restartservisce.txt · Last modified: 2018-06-21 19:48 (external edit)
CC Attribution-Noncommercial-Share Alike 4.0 International
Driven by DokuWiki Recent changes RSS feed Valid CSS Valid XHTML 1.0