Solved

who put db on single user mode

Posted on 2010-11-24
9
408 Views
Last Modified: 2012-05-10
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?

thanks
0
Comment
Question by:anushahanna
9 Comments
 
LVL 143

Accepted Solution

by:
Guy Hengel [angelIII / a3] earned 125 total points
ID: 34206315
unless you have some audit trail or sql profile trace ongoing at that time, you cannot find that info back after the fact.
0
 
LVL 10

Assisted Solution

by:Humpdy
Humpdy earned 250 total points
ID: 34206338
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.

0
 
LVL 10

Assisted Solution

by:Humpdy
Humpdy earned 250 total points
ID: 34206391
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.
0
The Eight Noble Truths of Backup and Recovery

How can IT departments tackle the challenges of a Big Data world? This white paper provides a roadmap to success and helps companies ensure that all their data is safe and secure, no matter if it resides on-premise with physical or virtual machines or in the cloud.

 
LVL 6

Author Comment

by:anushahanna
ID: 34206488
>>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?
0
 
LVL 10

Expert Comment

by:Humpdy
ID: 34206511
Anushahanna,
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.
0
 
LVL 6

Author Comment

by:anushahanna
ID: 34206659
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?
0
 
LVL 10

Expert Comment

by:Humpdy
ID: 34206700
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.
0
 
LVL 69

Assisted Solution

by:Scott Pletcher
Scott Pletcher earned 125 total points
ID: 34207539
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.
0
 
LVL 6

Author Comment

by:anushahanna
ID: 34210260
Thanks for your help, indeed..
0

Featured Post

NEW Veeam Agent for Microsoft Windows

Backup and recover physical and cloud-based servers and workstations, as well as endpoint devices that belong to remote users. Avoid downtime and data loss quickly and easily for Windows-based physical or public cloud-based workloads!

Question has a verified solution.

If you are experiencing a similar issue, please ask a related question

Suggested Solutions

When you hear the word proxy, you may become apprehensive. This article will help you to understand Proxy and when it is useful. Let's talk Proxy for SQL Server. (Not in terms of Internet access.) Typically, you'll run into this type of problem w…
Slowly Changing Dimension Transformation component in data task flow is very useful for us to manage and control how data changes in SSIS.
Via a live example, show how to extract insert data into a SQL Server database table using the Import/Export option and Bulk Insert.
This videos aims to give the viewer a basic demonstration of how a user can query current session information by using the SYS_CONTEXT function

740 members asked questions and received personalized solutions in the past 7 days.

Join the community of 500,000 technology professionals and ask your questions.

Join & Ask a Question