?
Solved

who put db on single user mode

Posted on 2010-11-24
9
Medium Priority
?
448 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
[X]
Welcome to Experts Exchange

Add your voice to the tech community where 5M+ people just like you are talking about what matters.

  • Help others & share knowledge
  • Earn cash & points
  • Learn & ask questions
9 Comments
 
LVL 143

Accepted Solution

by:
Guy Hengel [angelIII / a3] earned 500 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 1000 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 1000 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
Survive A High-Traffic Event with Percona

Your application or website rely on your database to deliver information about products and services to your customers. You can’t afford to have your database lose performance, lose availability or become unresponsive – even for just a few minutes.

 
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 70

Assisted Solution

by:Scott Pletcher
Scott Pletcher earned 500 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

Survive A High-Traffic Event with Percona

Your application or website rely on your database to deliver information about products and services to your customers. You can’t afford to have your database lose performance, lose availability or become unresponsive – even for just a few minutes.

Question has a verified solution.

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

Ever needed a SQL 2008 Database replicated/mirrored/log shipped on another server but you can't take the downtime inflicted by initial snapshot or disconnect while T-logs are restored or mirror applied? You can use SQL Server Initialize from Backup…
This article shows gives you an overview on SQL Server 2016 row level security. You will also get to know the usages of row-level-security and how it works
Familiarize people with the process of utilizing SQL Server functions from within Microsoft Access. Microsoft Access is a very powerful client/server development tool. One of the SQL Server objects that you can interact with from within Microsoft Ac…
Using examples as well as descriptions, and references to Books Online, show the documentation available for datatypes, explain the available data types and show how data can be passed into and out of variables.

649 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