Error in starting sql server in single user mode

  • Hi all,

    Do I need to stop sql server services before starting the instance in single user mode.......

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

  • Ahmad Osama (12/20/2008)


    Do I need to stop sql server services before starting the instance in single user mode.......

    Of course. An instance can't be running twice, it would conflict on network port, all the databases, the error log, etc.

    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
  • GilaMonster (12/20/2008)


    Ahmad Osama (12/20/2008)


    Do I need to stop sql server services before starting the instance in single user mode.......

    Of course. An instance can't be running twice, it would conflict on network port, all the databases, the error log, etc.

    Is it possible to stop an instance using a dos command..???

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

  • yes, use

    NET STOP servicename

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

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

  • I am using these batch commands to restore master database......

    Net Stop MSSQLSERVER

    cdset path=C:\Program Files\Microsoft SQL Server\MSSQL.4\MSSQL\Binn

    sqlservr -m

    sqlcmd -Usa -Psql2005 -Q "restore database master from disk='D:\SystemDatabaseBackups\MasterDatabaseBackup' with replace

    Net Stop MSSQLSERVER

    Net Start MSSQLSERVER

    however am unable to restore.....

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

  • Ahmad Osama (12/21/2008)


    however am unable to restore.....

    For what reason?

    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
  • GilaMonster (12/22/2008)


    Ahmad Osama (12/21/2008)


    however am unable to restore.....

    For what reason?

    Sql server successfully starts in single user mode....however the restore command as I posted doesn't runs....please find attached the snapshot

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

  • Your screen shot is too compressed to be readable. Please copy the error from the command prompt and paste it in a reply.

    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
  • Find attached the text file....

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

  • There are no errors there. That's SQL's startup messages. You need to connect to SQL from another command window, using sQLCMD and restore the database.

    Does the restore database give an error? If so, what error?

    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
  • GilaMonster (12/22/2008)


    There are no errors there. That's SQL's startup messages. You need to connect to SQL from another command window, using sQLCMD and restore the database.

    Does the restore database give an error? If so, what error?

    Yes, It says

    C:\Documents and Settings\gauravl.WFXGUR\Desktop>sqlcmd -E -Q "restore database

    master from disk='D:\SystemDatabaseBackups\MasterDatabaseBackup'"

    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.

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

  • 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

    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/21/2008)


    I am using these batch commands to restore master database......

    Net Stop MSSQLSERVER

    cdset path=C:\Program Files\Microsoft SQL Server\MSSQL.4\MSSQL\Binn

    sqlservr -m

    sqlcmd -Usa -Psql2005 -Q "restore database master from disk='D:\SystemDatabaseBackups\MasterDatabaseBackup' with replace

    Net Stop MSSQLSERVER

    Net Start MSSQLSERVER

    however am unable to restore.....

    are you sure

    NET STOP MSSQLSERVER

    is stopping the correct instance?

    MSSQL.4 could have a service name of something like MSSQL$INST4.

    How many sql instances are installed on this server?

    😉

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

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

  • Perry Whittle (12/22/2008)


    are you sure

    NET STOP MSSQLSERVER

    is stopping the correct instance?

    It's the same instance that he's starting and the same one he's connecting to via sqlcmd. Whether it's the correct instance is another story.

    The error log refers to Mssql.1, so probably not...

    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
  • yeah, you'd expect a named instance to have a unique servicename

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

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

Viewing 15 posts - 1 through 15 (of 23 total)

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