Error in starting sql server in single user mode

  • GilaMonster (12/22/2008)


    So you've got the SQL service stopped, you've got one command window where you ran sqlservr.exe -m and left it running, and another command window where you're trying to connect using sqlcmd. Is that correct?

    What does just running sqlcmd return?

    sqlcmd -S BUILDSERVER -E

    Hey am getting the same error.....

    C:\>sqlcmd -S BUILDSERVER -E

    HResult 0xE9, Level 16, State 1

    Shared Memory Provider: No process is on the other end of the pipe.

    Sqlcmd: Error: Microsoft SQL Native Client : Communication link failure.

    I have default instance installed on my machine...and there isn't any other service name in services.msc ......

    Regards,
    [font="Verdana"]Sqlfrenzy[/font]

  • Ok. Confirm the following for me.

    1) You have stopped the service.

    2) You have one command window open where you ran sqlservr -m and then left it running

    3) You are running sqlcmd from a separate command window?

    Gail Shaw
    Microsoft Certified Master: SQL Server, MVP, M.Sc (Comp Sci)
    SQL In The Wild: Discussions on DB performance with occasional diversions into recoverability

    We walk in the dark places no others will enter
    We stand on the bridge and no one may pass
  • Ahmad Osama (12/22/2008)sqlcmd -S BUILDSERVER -E

    is BUILDSERVER the correct instance name?

    restart the instance and login through SSMS and open a new query window then run

    select @@servername

    -----------------------------------------------------------------------------------------------------------

    "Ya can't make an omelette without breaking just a few eggs" 😉

  • Perry Whittle (12/22/2008)


    Ahmad Osama (12/22/2008)sqlcmd -S BUILDSERVER -E

    is BUILDSERVER the correct instance name?

    It's the servername of the server that he's starting in single user mode. Check the attached error log a few posts back.

    Gail Shaw
    Microsoft Certified Master: SQL Server, MVP, M.Sc (Comp Sci)
    SQL In The Wild: Discussions on DB performance with occasional diversions into recoverability

    We walk in the dark places no others will enter
    We stand on the bridge and no one may pass
  • ah see it now.

    -----------------------------------------------------------------------------------------------------------

    "Ya can't make an omelette without breaking just a few eggs" 😉

  • GilaMonster (12/22/2008)


    Ok. Confirm the following for me.

    1) You have stopped the service.

    2) You have one command window open where you ran sqlservr -m and then left it running

    3) You are running sqlcmd from a separate command window?

    Yes, I am doing exactly as u said....

    Regards,
    [font="Verdana"]Sqlfrenzy[/font]

  • If Restoring master database is your problem, then here is a short cut.

    Step1 : Restore the master database backup you have right now with any database name ( say exampledb ) , that will create exampledb.mdf and exampledb_1.ldf files.

    Step2: Stop SQL Server.

    Step3: Go to location where you have master databases .mdf and .ldf files residing on OS. Copy exampledb.mdf and exampledb_1.ldf files and paste it in the same location of master database data and log file.

    Step4: Move master.mdf and mastlog.ldf to some other location.

    Step5: Rename exampledb.mdf and exampledb_1.ldf files to master.mdf and mastlog.ldf.

    Step6: Now Restart SQL Server.

    But I guess you are trying to move master database files to some other location ???

    Please check this link: http://support.microsoft.com/kb/224071

    Regards

    IM

    -- (Teaching is Learning Twice)

  • sayfrend (12/22/2008)


    If Restoring master database is your problem, then here is a short cut.

    Thanks....but I want to embed my code in a batch for automatic execution....

    Regards,
    [font="Verdana"]Sqlfrenzy[/font]

  • Can I use a batch file as I posted earlier to restore master database .....

    Regards,
    [font="Verdana"]Sqlfrenzy[/font]

Viewing 9 posts - 16 through 23 (of 23 total)

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