MS SQL Server return from Emergency Mode

Larry Brister
Larry Brister used Ask the Experts™
on
I had a database I could not access until I set it using the following...

ALTER DATABASE emergencydemo SET EMERGENCY;
    GO
ALTER DATABASE emergencydemo SET SINGLE_USER;

How do I get it back to normal mode?
Comment
Watch Question

Do more with

Expert Office
EXPERT OFFICE® is a registered trademark of EXPERTS EXCHANGE®
Senior Software Developer
Commented:
If you're in emergency mode then you're basically at the very edge. There's no guarantee that you'll come back from this but here's something to try:

DBCC CHECKDB (emergencydemo, REPAIR_ALLOW_DATA_LOSS) WITH NO_INFOMSGS;
GO
ALTER DATABASE emergencydemo SET MULTI_USER;
GO
Larry Bristersr. Developer

Author

Commented:
Thanks
Russ SuterSenior Software Developer

Commented:
I should emphasize that data loss IS a possibility with this command.

You could first try
DBCC CHECKDB (emergencydemo, REPAIR_REBUILD) WITH NO_INFOMSGS;
GO

Good luck!

Do more with

Expert Office
Submit tech questions to Ask the Experts™ at any time to receive solutions, advice, and new ideas from leading industry professionals.

Start 7-Day Free Trial