Sql-server – Notify on SQL trace event starting

sql serversql-server-2012

I was wondering if there was a method of receiving some sort of notification when a SQL trace begins – be it e-mail or some other method? The circumstances of needing this we currently have a substantial amount of developers working within the same dev database and we sometimes find that a performance hit is due to one of them leaving the trace open instead of properly closing it. I understand the message needs to be spread to limit SQL trace usage to small timeframes, but alas, we are faced with this issue and must find a way to better administer it. Any insight would be much appreciated.

Best Answer

I don't believe there is an extended event for a trace starting. One thing you could do is to write a SQL Agent job that queries sys.traces and if anything but the default trace exists, take whatever action you deem necessary.