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

Id of most recent login? Expand / Collapse
Author
Message
Posted Friday, October 26, 2012 5:24 AM
SSC Rookie

SSC RookieSSC RookieSSC RookieSSC RookieSSC RookieSSC RookieSSC RookieSSC Rookie

Group: General Forum Members
Last Login: Friday, February 22, 2013 10:15 AM
Points: 41, Visits: 155
Hi all,

I have an orphaned .mdf + .ldf fileset on our production box, I know how to attach them.

But I also need to find out who the last user was. Any idea how to do this?

Cheers,


BLL
Post #1377501
Posted Friday, October 26, 2012 7:28 AM


SSChampion

SSChampionSSChampionSSChampionSSChampionSSChampionSSChampionSSChampionSSChampionSSChampionSSChampion

Group: General Forum Members
Last Login: Yesterday @ 9:27 PM
Points: 14,550, Visits: 38,420
blacklabellover2003 (10/26/2012)
Hi all,

I have an orphaned .mdf + .ldf fileset on our production box, I know how to attach them.

But I also need to find out who the last user was. Any idea how to do this?

Cheers,


BLL

nope, sorry, no place to get that data unless you have some sort of auditing or custom trace running.

only current users are available, which you can see via sp_who/sp_who2 for example.
past users are not stored anywhere.
after you attach the database, you could find the last user CREATED in the database, but that certainly does not imply that was the last user to access the database before it was detached.


Lowell

--
help us help you! If you post a question, make sure you include a CREATE TABLE... statement and INSERT INTO... statement into that table to give the volunteers here representative data. with your description of the problem, we can provide a tested, verifiable solution to your question! asking the question the right way gets you a tested answer the fastest way possible!
Post #1377574
Posted Wednesday, November 7, 2012 6:36 AM
SSC Rookie

SSC RookieSSC RookieSSC RookieSSC RookieSSC RookieSSC RookieSSC RookieSSC Rookie

Group: General Forum Members
Last Login: Friday, February 22, 2013 10:15 AM
Points: 41, Visits: 155
Lowell (10/26/2012)
blacklabellover2003 (10/26/2012)
Hi all,

I have an orphaned .mdf + .ldf fileset on our production box, I know how to attach them.

But I also need to find out who the last user was. Any idea how to do this?

Cheers,


BLL

nope, sorry, no place to get that data unless you have some sort of auditing or custom trace running.

only current users are available, which you can see via sp_who/sp_who2 for example.
past users are not stored anywhere.
after you attach the database, you could find the last user CREATED in the database, but that certainly does not imply that was the last user to access the database before it was detached.


Appreciate that, thanks. In this case I've thrown the prob back to the apps team, but will remember your advice as this will recur, no doubt.

Post #1381949
« Prev Topic | Next Topic »

Add to briefcase

Permissions Expand / Collapse