Quantcast
Viewing all articles
Browse latest Browse all 15889

How to get execute user information from "sys.dm_exec_sql_text"

Hello,

Some day ago, my database lose data. Somebody delete rows in table by "Microsoft SQL Manager tools" so i can't trace what they do.

I using SQL, get history of statement executed. But how to know : Who execute, Workstation name ?

SELECT  * into #temp
FROM    sys.dm_exec_query_stats d
        CROSS APPLY sys.dm_exec_sql_text(d.plan_handle) AS e where text like '%delete%' order by creation_time asc

Thanks for your help.


Cuong


Viewing all articles
Browse latest Browse all 15889

Trending Articles



<script src="https://jsc.adskeeper.com/r/s/rssing.com.1596347.js" async> </script>