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)"

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

How to Restart IIS Using Batch file




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

*******************************************************************************
net stop w3svc
net stop iisadmin
net start iisadmin
net start w3svc
*******************************************************************************