MS SQL Server return from Emergency Mode

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?
Larry Bristersr. DeveloperAsked:
Who is Participating?
 
Russ SuterConnect With a Mentor 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
0
 
Larry Bristersr. DeveloperAuthor Commented:
Thanks
0
 
Russ SuterCommented:
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!
0
Question has a verified solution.

Are you are experiencing a similar issue? Get a personalized answer when you ask a related question.

Have a better answer? Share it in a comment.

All Courses

From novice to tech pro — start learning today.