Query hint QUERYTRACEON is now documented publically

I just wanted to put a quick note that QUERYTRACEON is now publically documented in http://support.microsoft.com/kb/2801413/en-us.  If you have situations where you don’t want to enable an optimizer trace flag globally on your server instance, you can use this hint for a specific query.   Note that we only support the trace flags listed in the KB article. 

Comments (3)

  1. Jeroen Mostert says:

    That is extremely cool. I'm torn between being angry at you people for not documenting this before and being happy that I know this exists. 🙂

  2. Shawn Bivins says:

    There should be a note in the documentation regarding permissions needed to use the hint.

  3. Darko Martinović says:

    In order to use querytraceon, app user should be a member of sysadmin role. It is not usefull for production. There are couple workarounds ( using stored procedure execute as owner or using plan guides ) but still not suitable for production.