[SQL Server] Trouver l'utilisateur qui a lancé DROP ou DELETE sur vos objets SQL Server (La requête)

SELECT *,SUSER_SNAME([Transaction SID]) FROM

(

SELECT

    [Transaction ID],

    Operation,

    Context,

    AllocUnitName

FROM

    fn_dblog(NULL, NULL)

WHERE

    Operation = 'LOP_DELETE_ROWS'

    ) T1

JOIN

(   

   

SELECT

    Operation,

    [Transaction ID],

    [Begin Time],

    [Transaction Name],

    [Transaction SID]

FROM

    fn_dblog(NULL, NULL)

WHERE

    [Operation] = 'LOP_BEGIN_XACT'

 ) T2 ON T2.[Transaction ID]=T1.[Transaction ID]