Solved

who put db on single user mode

Posted on 2010-11-24
9
375 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 142

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
 
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
PRTG Network Monitor: Intuitive Network Monitoring

Network Monitoring is essential to ensure that computer systems and network devices are running. Use PRTG to monitor LANs, servers, websites, applications and devices, bandwidth, virtual environments, remote systems, IoT, and many more. PRTG is easy to set up & use.

 
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:ScottPletcher
ScottPletcher 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

Complete VMware vSphere® ESX(i) & Hyper-V Backup

Capture your entire system, including the host, with patented disk imaging integrated with VMware VADP / Microsoft VSS and RCT. RTOs is as low as 15 seconds with Acronis Active Restore™. You can enjoy unlimited P2V/V2V migrations from any source (even from a different hypervisor)

Question has a verified solution.

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

Having an SQL database can be a big investment for a small company. Hardware, setup and of course, the price of software all add up to a big bill that some companies may not be able to absorb.  Luckily, there is a free version SQL Express, but does …
This article explains how to reset the password of the sa account on a Microsoft SQL Server.  The steps in this article work in SQL 2005, 2008, 2008 R2, 2012, 2014 and 2016.
Via a live example, show how to setup several different housekeeping processes for a SQL Server.
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.

910 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

Need Help in Real-Time?

Connect with top rated Experts

23 Experts available now in Live!

Get 1:1 Help Now