sql server - Can I check what T-SQL statement had been executed in the database? -
i have c# application, thing in database, black boxed, possible can check t-sql statements had been run on sql server? thanks.
profiler way go serge said keep query in pocket when can't approval enable profiler on production.
select top 50 deqs.last_execution_time [time], dest.text [query] sys.dm_exec_query_stats deqs cross apply sys.dm_exec_sql_text(deqs.sql_handle) dest order deqs.last_execution_time desc
of course want modify top 50
show more or less results.
note: i've used such long time forgot didn't come myself. found on sqlauthority. credit credit due! :)
Comments
Post a Comment