SQL SERVER – 2005 – Start Stop Restart SQL Server From Command Prompt

Very frequently I use following command prompt script to start and stop default instance of SQL Server. Our network admin loves this commands as this is very easy.

Click Start >> Run >> type cmd to start command prompt.

Start default instance of SQL Server
net start mssqlserver
SQL SERVER - 2005 - Start Stop Restart SQL Server From Command Prompt netstart

Stop default instance of SQL Server
net stop mssqlserver
SQL SERVER - 2005 - Start Stop Restart SQL Server From Command Prompt netstop

Start and Stop default instance of SQL Server.
You can create batch file to execute both the commands together.
SQL SERVER - 2005 - Start Stop Restart SQL Server From Command Prompt netstartstop

Reference : Pinal Dave (https://blog.sqlauthority.com)

SQL Scripts, SQL Utility
Previous Post
SQL SERVER – UDF – User Defined Function – Get Number of Days in Month
Next Post
SQLAuthority News – Job Opportunity in Ahmedabad, India to Work with Technology Leaders Worldwide

Related Posts

114 Comments. Leave new

  • Hi Pinal,
    How can I stop all the instances running on the same sql server. using command prompt.

    Reply
  • Hi All,

    I am able to stop and start the services by running this commands from command prompt. But our requirement is to take the back up. Before taking the back up we need to stop the SQL Server services and take the backup and start the services again.

    Is there anyway to schedule these commands? Appreciate your reply on this.

    Thanks.

    Reply
  • Hi,

    I am trying to install SQL server 2005 developer edition on win 7 32bit, when the installation reaches a point where it has to start the server it says server error.

    I have tried using the Microsoft help, to resolve but unfortunately to no avail.

    Could you be of assistance?

    Thanks.

    Reply
  • Microsoft SQL Server 2005 için

    for Microsoft SQL Server 2005

    NET STOP MSSQL$SQLEXPRESS

    NET START MSSQL$SQLEXPRESS

    Reply
  • Eng.Alaa Saqallah
    September 23, 2011 7:07 pm

    thanks for your helpful article , but in fact I have a serious problem,
    when i start cmd and echo :
    net start mssqlserver
    i have : “System error 5 has occoured ‘
    access denied”

    ?????

    and i don’t know how to access sqlserver 2008 with “sa”, as i forget the password :(

    please help me as soon as possible

    Eng.Alaa Saqallah

    Reply
  • Alaa,

    If you installed SQL using mixed mode, you should be able to log in to the computer Administrator’s account and then using Window’s Authentication enter SQL and rename the password.

    Reply
  • tHANK SIR,,

    VERY REALLY HELPFULLY

    Reply
  • guilhermeferrera
    November 26, 2011 8:14 pm

    Good! Thanks.

    Reply
  • Just I open SQL Server by using command prompt
    NET START MSSQLSERVER and it is not successfully done… why ?? somebody gve me an answer… plz…

    Reply
  • Can the SQL Server shutdown event be tracked?

    Reply
  • my sql server has stopped and didnt start .
    i have tried everything but no got any good news ,
    and my sql server new installation tooo get bad after somedays

    Reply
  • Guys,

    Can someone asnwer my question please?

    I have sql installed on cluster. I need to stop sql server but none of the node is allowing me to login. Both nodes exceeded max number of connections. How I can stop my SQL.

    Reply
  • I installed .net in windows 7 but it not display icons of the tools bar

    Reply
  • Hi to all
    I installed SQL server 2005 to my client computer but is not connected to database so please help me how to connect to database(server)….
    thanks

    Reply
  • thanks

    Reply
  • Hi there,

    Good day, would like to know what is the different between server restart and sql server service restart? which for my understanding that both will cause down time as well and any other difference between? Kindly advice.

    Thanks for your help.

    Reply
  • Jija Dahifale
    March 28, 2012 4:52 pm

    Hello sir,

    I have installed SQL server 2000 and SQL server 2005 on Windows server 2003 machine. I want to stop SQL server 2005, I have tried your comment on Star-Stop Sql…i.e net Start mssqlserver. ……..but using this I can stop SQL server 2000…T

    Reply
  • Hi everybody,

    I have a problem with SQL SERVER 2005.
    I installed SQL SERVER 2005 on my computer, I tried to register a localhost server but gives me this error: sql server does not exits or access refused.
    I tried to follow some of the solution provided above but it didn’t work, when I tried to run sql server through services.msc i do not find sql server services in the list.

    Reply
  • Hi ….please give some comments on how to start and stop the SQL server services on 2 node cluster enviornment…

    Reply
  • Pinal,
    If my database is present in another system than how I will restart the database.
    Thanks

    Reply

Leave a Reply