QUERYTRACEON with no additional permissions - by Ola Hallengren

Status : 

 


27
0
Sign in
to vote
ID 1619568 Comments
Status Closed Workarounds
Type Suggestion Repros 0
Opened 8/2/2015 10:31:33 AM
Access Restriction Public

Description

QUERYTRACEON enables you to use trace flags as hints on the query level.
 
The problem is just you need to have sysadmin permissions to use QUERYTRACEON.
 
I would like to be able to use QUERYTRACEON with certain trace flags (e.g. 4199, 9481, and 2312) in queries with no additional permissions.
Sign in to post a comment.
Posted by Pedro [MSFT] on 11/14/2016 at 11:49 AM
Alternative will be provided in upcoming SQL Server 2016 update.
Posted by Dan Guzman on 10/26/2015 at 4:12 PM
I posted an undocumented workaround for cases where the query is included in a stored procedure. I'd like to see that behavior documented if it will be supported.

We need non-sysadmins to be able to use QUERYTRACEON with the aforementioned trace flags because problem queries are often run by minimally privileged users.
Posted by Sunil [MSFT] on 8/4/2015 at 7:19 PM
Ola, thanks for submitting the feedback. I have assigned this to security team to take a look

regards
Sunil