Net Stop mssql$YourSQLServerInstanceName
Above command is used to start and stop SQL Server Service. Now, here is the command for SQL Server agent.
Net Stop sqlagent$YourSQLServerInstanceName
My instance name of SQL Server 2008 is “SQL2k8” so my command would be
Net Stop mssql$SQL2K8
Indeed I have one batch file which do this stuff for me. Just go to command prompt and run .BAT file is really easy than going to Control Panel->Administrative Tools->Services, find services and restart it.
Look at the screen below for more details.
Note: Microsoft Books online is a default reference of all articles but examples and explanations prepared by Ritesh Shah, founder of http://www.SQLHub.com