How to take database out of emergency mode?

In SQL Server 2000

sp_configure ‘allow’ ,1
GO
Reconfigure with override
GO
Update sysdatabases set status = status&(~32768) where name = ‘SQLDBPool’
GO
sp_configure ‘allow’, 0
GO
Reconfigure with override
go

IN SQL Server 2005/2008

ALTER DATABASE sqldbpool
SET online

Comments

5 responses to “How to take database out of emergency mode?”

  1. Subahan Munthamadugu Avatar
    Subahan Munthamadugu

    the abow command is also not working i.e when i run the abow command then i got an error please give me another method

  2. Subahan Munthamadugu Avatar
    Subahan Munthamadugu

    Hi jugal shah,

    when i run the “restore veryfionly from disk=’path’”
    then i got the folling error please give reson for that i.e why it will get that error message

    Msg 3201, Level 16, State 2, Line 1
    Cannot open backup device ‘E:\SQLLOG\SQL12\dhamodharan.ldfD’. Operating system error 2(The system cannot find the file specified.).
    Msg 3013, Level 16, State 1, Line 1
    VERIFY DATABASE is terminating abnormally.

    1. Jugal Shah Avatar

      Check for the required permission, it seems you are verifying the transaction log file, restore verify only work with backup files only.

  3. Vikas Avatar
    Vikas

    This is wrong T-SQL query it should be sp_configure ‘allow updates’ ,1 instead of sp_configure ‘allow’ ,1

    1. Jugal Shah Avatar

      Have you checked it with SQL Server 2000?

Thanks for the comment, will get back to you soon… Jugal Shah