Problem with Sqlservr.exe -m

  • Michael Ludlam

    SSC Enthusiast

    Points: 121

    Hi,

    Windows 2003, Sql Server 2005 (SP2 3042)

    Was DRP'ing a server over the weekend and was not able to start sql server in single user mode. From the Binn directory I ran

    sqlservr.exe -m and everything appeared to be ok but the restore failed with the database must be in single user - did a work around to get things going.

    Come monday I'm and testing this on a test system, same thing happens, however if I start sql server using 'net start mssqlserver /m'

    it starts in single user mode everything works fine

    What could be the issue with sqlservr.exe?

    Thanks.

  • Deepak-405225

    SSCertifiable

    Points: 6060

    You can start Sql Server in single user mode using net start command as well as shown here for default instance of Sql Server. You need to type the below commands from command prompt

    Default instance

    NET START MSSQLSERVER /c /m

    Named instance

    NET START MSSQL$Instancename /c /m

    [font="Verdana"]- Deepak[/font]

  • Carl Federl

    One Orange Chip

    Points: 25324

    You should only run the sqlservr.exe from a command prompt to isolate a problem with running as a service and you should not perform any other actvities other than stopping sqlserv.exe. This includes all maintenance actions such as creating a new database, changing any configuration, restoring a database or changing the location of a data file. If you do so, SQL Server may be unable to access it when running later as a service.

    NET START is the only command line method that should be used.

    SQL = Scarcely Qualifies as a Language

  • Miron Berlin

    SSC-Addicted

    Points: 414

    Carl Federl - Monday, May 26, 2008 8:50 PM

     If you do so, SQL Server may be unable to access it when running later as a service.NET START is the only command line method that should be used.

    SQL Server gets launched from command line when these considerations no longer have meaning. There are better places to show HR swagger.

  • Jeff Moden

    SSC Guru

    Points: 993661

    Miron Berlin - Sunday, July 15, 2018 2:55 AM

    Carl Federl - Monday, May 26, 2008 8:50 PM

     If you do so, SQL Server may be unable to access it when running later as a service.NET START is the only command line method that should be used.

    SQL Server gets launched from command line when these considerations no longer have meaning. There are better places to show HR swagger.

    Ok... I'll bite.  What is meant by "HR swagger".

    --Jeff Moden


    RBAR is pronounced "ree-bar" and is a "Modenism" for Row-By-Agonizing-Row.
    First step towards the paradigm shift of writing Set Based code:
    ________Stop thinking about what you want to do to a row... think, instead, of what you want to do to a column.
    "If you think its expensive to hire a professional to do the job, wait until you hire an amateur."--Red Adair
    "Change is inevitable... change for the better is not."
    When you put the right degree of spin on it, the number 3|8 is also a glyph that describes the nature of a DBAs job. 😉

    Helpful Links:
    How to post code problems

Viewing 5 posts - 1 through 5 (of 5 total)

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