SQLTeam.com | Weblogs | Forums

Slow Query log


#1

Hi Experts,

Can I log slow queries in file which are located to other directory, Is this is possible in Sql server 2012. Please suggest a way .

Thanks .


#2

It's been a while since I've tried this on SQL Server 2012 but an Extended Event session should work. You capture all RPC Completed and SQL Batch Completed over a certain duration -- I use 1 second. Or maybe 10 seconds.


#3

Hi Graz,

Mean i need to write my batch file to capture slow query and scheduled it with interval of 1 minute or 10 sec.


#4

an extended event session just writes to the file continuously.