who put db on single user mode

the error log shows that
Setting database option SINGLE_USER to ON for database TRACKER.
and then back to MULTI after some time..

but does not show who/which user did it- is it possible to see this info from elsewhere?

Who is Participating?
Guy Hengel [angelIII / a3]Connect With a Mentor Billing EngineerCommented:
unless you have some audit trail or sql profile trace ongoing at that time, you cannot find that info back after the fact.
HumpdyConnect With a Mentor Commented:
In event viewer, look for the time this happend, and the source of MSSQLSERVER

it will give you the user who executed the statement.
I just did it and my eventviewer shows it.

HumpdyConnect With a Mentor Commented:
BTW, I just did another test, from another computer and the user did not show up in event viewer.
however, it did give the SPID, and I was able to get the user from activity monitor.
Cloud Class® Course: Microsoft Office 2010

This course will introduce you to the interfaces and features of Microsoft Office 2010 Word, Excel, PowerPoint, Outlook, and Access. You will learn about the features that are shared between all products in the Office suite, as well as the new features that are product specific.

anushahannaAuthor Commented:
>>however, it did give the SPID, and I was able to get the user from activity monitor.

but that is not possible, if the user has logged off, right?
yes, it remains in activity monitor even if the user has logged off..
I have logged off and I can still see mine in the activity monitor.
anushahannaAuthor Commented:
sorry- i am not following you.

after user logs off, the spid gets lost to another user, right? (or stays unoccupied?)
(also i am familiar with jobs activity monitory)- where is the user activity monitor in SSMS?
There is a jobs activity monitor, and also an activity monitor.

This is under management. where the maintenance plans and logs are.
The spid won't get lost until a new process takes it over. If idle, it will show up as sleeping status in activity monitor.
Scott PletcherConnect With a Mentor Senior DBACommented:
Yes, the spid could have been re-assigned to another task between the time the ALTER DATABASE ran and when you looked at the activity.

Spids can be re-used, and thus should be thought of as essentially point-in-time: if you don't capture an event right away, knowing the spid won't do you much good.
anushahannaAuthor Commented:
Thanks for your help, indeed..
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.