Quantcast
Channel: SQL Server Setup & Upgrade forum
Viewing all articles
Browse latest Browse all 5760

Transaction Log backup

$
0
0

Hi,

Someone has update the master table with wrong data, In order to find the person who commited the wrong output, I have used the Transaction Log Backup file and read the file using sys.fn_dblog.

Now the output looks like below:

UserNameCurrent LSNTransaction IDOperationTransaction NameCONTEXTAllocUnitNamePage IDSlot IDBegin TimeEnd TimeNumber of LocksLock Information
NULL000b136d:001bd2b8:015c0001:2517521cLOP_MODIFY_ROWNULLLCX_PFSdbo.tblLocMst.IX_missing_tblLocMst0003:000000010NULLNULL0 

After this, I have executed the below code to identify the User Name etc..

SELECT
    Operation,
    [Transaction ID],
    [Begin Time],
    [Transaction Name],
    [Transaction SID],
    SUSER_SNAME([Transaction SID]) as UserName
FROM
    fn_dblog(NULL, NULL)
WHERE
    [Transaction ID] = '0001:25177f5e'
AND
    [Operation] = 'LOP_BEGIN_XACT'

This code returns the Database User (SA in my case) who executed this wrong update command, Is there any way i can find the IP address or Host name of the person who done this wrong update.

Appreciate,

Thanks and regards,

Sheetal.


Viewing all articles
Browse latest Browse all 5760
<script src="https://jsc.adskeeper.com/r/s/rssing.com.1596347.js" async> </script>