Greetings All,
I want to retrieve back the past queries in my database while using DMV. My query join with dm_exec_query_stats and found out this dm_exec_query_stats only store today data, how to retrieve previous day data? DMV data will get deleted when perform restart SQL services or is there any other way to clear DMV data? Please advise. Currently I want to get back last week query and I want to know how long does my session being run. Thank you.
Regards,
Justin Wong