Undo single user mode

  • I started sql server in a single user mode from the enterprise manager.  Later I can't connect into it.  Is there a way to undo the single user mode from a command line?

  • I think it goes something like this:

    use master

    go

    exec sp_dboption dbname, 'single user', false

    go

    --check point

    use dbname

    go

    checkpoint

    go

     

     

  • sp_dboption is still around for backward compatibility.  Microsoft now recommends using ALTER DATABASE.

    You should read BOL about the options and the effect of this operation on your database, especially what happens to users connected to the database when you execute the comman.

    Now, for the short answer this will do what you need:

    ALTER DATABASE test SET SINGLE_USER

     

    HTH

  • Did the poster not say "...started sql server..."

    Not a database...

    Unless they meant a database...

    Can you not connect to sql or can you not connect to a database?

  • You know that the reason I could not use the EM to connect was because my sqlagent service was running (that one connection right there).  After stopping the sqlagent serivice, I was able to use my EM to disable the single user mode.

    Thanks to you all!

     

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

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