REstart service from command line?

  • Is something changed on SQL 2008 R2 ? becasue i can restart from cmdline in sql 2005 but not from 2008R2, how do i do that?

    Here is what i am using now which does not restart the service.

    @ECHO OFF

    NET STOP SQLSERVERAGENT

    NET STOP MSSQLSERVER

    NET START MSSQLSERVER

    NET START SQLSERVERAGENT

  • for default instance:

    net start "SQL Server Agent (MSSQLSERVER)"

    net start "SQL Server (MSSQLSERVER)"

    for instance:

    net start "SQL Server Agent(instancename)"

    net start "SQL Server (instancename)"

    HTH 😀

    "Technology is a weird thing. It brings you great gifts with one hand, and it stabs you in the back with the other. ...:-D"

  • deos this apply only for 2008?

  • Yep, it should.:-D try it and let me know.

    "Technology is a weird thing. It brings you great gifts with one hand, and it stabs you in the back with the other. ...:-D"

Viewing 4 posts - 1 through 3 (of 3 total)

You must be logged in to reply to this topic. Login to reply