Set Query governor in a logon trigger

  • Using the SET QUERY_GOVERNOR_COST_LIMIT in a logon trigger doesn't seem to work. Is there anyway to get around this? I basically want to set the query limit at the session level diven by a table that defines the limits per user.

  • Anyone have any ideas?

  • SET QUERY_GOVERNOR_COST_LIMIT sets the limit for all commands in a batch, not at a connection or user level. so the limit was invoked during the life of the trigger execution, and then reverts back to whatever the server is set for.

    each connection takes the default values fromt he server, unless you have the application making the connection issue that command for each batch it runs.

    you could change the application they are using to connect to make sure it sets that value, but you cannot set it on their behalf via a trigger.

    Lowell


    --help us help you! If you post a question, make sure you include a CREATE TABLE... statement and INSERT INTO... statement into that table to give the volunteers here representative data. with your description of the problem, we can provide a tested, verifiable solution to your question! asking the question the right way gets you a tested answer the fastest way possible!

  • That is what I figured which is unfortunate.

Viewing 4 posts - 1 through 4 (of 4 total)

You must be logged in to reply to this topic. Login to reply