Click here to monitor SSC
SQLServerCentral is supported by Redgate
Log in  ::  Register  ::  Not logged in
Home       Members    Calendar    Who's On

Add to briefcase

How to find who changed the database to Single_user mode. Expand / Collapse
Posted Thursday, July 4, 2013 3:55 AM
SSC Rookie

SSC RookieSSC RookieSSC RookieSSC RookieSSC RookieSSC RookieSSC RookieSSC Rookie

Group: General Forum Members
Last Login: Thursday, June 2, 2016 4:34 AM
Points: 33, Visits: 231

Hi All,

One of our databases changed to single_user mode. But we could not find the exact user, hostname etc. Is there is any way to find these details?
I had gone through the SQL Server Error logs and Windows event error logs. But could find the exact user who changed the database to single_user mode? Do database automatically changed to single user mode?

Post #1470376
Posted Thursday, July 4, 2013 4:04 AM



Group: General Forum Members
Last Login: Yesterday @ 5:18 AM
Points: 45,619, Visits: 44,147
SQL will never automatically change the recovery model. If it was changed, someone changed it.

Check the default trace, if the change was recent enough it may still be in there.

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

Post #1470383
Posted Friday, July 5, 2013 8:17 AM


Group: General Forum Members
Last Login: Monday, November 21, 2016 6:18 AM
Points: 1,602, Visits: 2,555
If the security's tight (which is rarely the case, from experience taking on new DB), in SQL you can track who has the ALTER DATABASE permission.

But most of the times almost everyone has full sysadmin access (unfortunately) which makes things complicated.
What you could do however is setup a DDL trigger and log any information you can for the next time it occurs.

Otherwise go as what Gail's suggest.
Post #1470752
« Prev Topic | Next Topic »

Add to briefcase

Permissions Expand / Collapse