SQL Clone
SQLServerCentral is supported by Redgate
 
Log in  ::  Register  ::  Not logged in
 
 
 


Id of most recent login?


Id of most recent login?

Author
Message
blacklabellover2003
blacklabellover2003
Valued Member
Valued Member (63 reputation)Valued Member (63 reputation)Valued Member (63 reputation)Valued Member (63 reputation)Valued Member (63 reputation)Valued Member (63 reputation)Valued Member (63 reputation)Valued Member (63 reputation)

Group: General Forum Members
Points: 63 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
Lowell
Lowell
One Orange Chip
One Orange Chip (28K reputation)One Orange Chip (28K reputation)One Orange Chip (28K reputation)One Orange Chip (28K reputation)One Orange Chip (28K reputation)One Orange Chip (28K reputation)One Orange Chip (28K reputation)One Orange Chip (28K reputation)

Group: General Forum Members
Points: 28323 Visits: 39955
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!

blacklabellover2003
blacklabellover2003
Valued Member
Valued Member (63 reputation)Valued Member (63 reputation)Valued Member (63 reputation)Valued Member (63 reputation)Valued Member (63 reputation)Valued Member (63 reputation)Valued Member (63 reputation)Valued Member (63 reputation)

Group: General Forum Members
Points: 63 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.
Go


Permissions

You can't post new topics.
You can't post topic replies.
You can't post new polls.
You can't post replies to polls.
You can't edit your own topics.
You can't delete your own topics.
You can't edit other topics.
You can't delete other topics.
You can't edit your own posts.
You can't edit other posts.
You can't delete your own posts.
You can't delete other posts.
You can't post events.
You can't edit your own events.
You can't edit other events.
You can't delete your own events.
You can't delete other events.
You can't send private messages.
You can't send emails.
You can read topics.
You can't vote in polls.
You can't upload attachments.
You can download attachments.
You can't post HTML code.
You can't edit HTML code.
You can't post IFCode.
You can't post JavaScript.
You can post emoticons.
You can't post or upload images.

Select a forum

































































































































































SQLServerCentral


Search