SQL Script to find the last executed commands on the SQl Server

DBA SQL Advanced SQL Server
Sometimes we needs to find out the last executed commands on the database server. 
Below is the SQL script share by one of my friend Ken Watson to find out the last executed queries.

SELECT usecounts, cacheobjtype, objtype, text 
FROM sys.dm_exec_cached_plans 
CROSS APPLY sys.dm_exec_sql_text(plan_handle) 
WHERE usecounts > 1 
ORDER BY usecounts DESC; 

About Ken
He is working as SQL DBA. 
Blog:-  interflextech.com/blog
Twitter:- @interflextech

30 thoughts on “SQL Script to find the last executed commands on the SQl Server

  1. Pingback: gazebo
  2. Pingback: Istanaimpian2
  3. Pingback: Welding Equipment
  4. Pingback: New York Realtor
  5. Pingback: Sexual Function
  6. Pingback: Casa em Orlando
  7. Pingback: Online Casino
  8. Pingback: xembongda tructiep
  9. Pingback: 바카라
  10. Pingback: Massage Danmark
  11. Pingback: Dream Market
  12. Pingback: Tochka Market
  13. Pingback: mansion88

Leave a Reply