0

I'm learning about the resource governor classifier function: https://learn.microsoft.com/en-us/sql/relational-databases/resource-governor/create-and-test-a-classifier-user-defined-function?view=sql-server-ver16

The example shown in the above link is about how to use the current time to classify the query to use respective workload group (and the resource pool) by looking up from another table.

I want to understand what are the other query attributes that the resource governor classifier function can access.

For example: Can we access the Query text, username, database name, any thing else?

1 Answer 1

1

I can't find this being documented anywhere, for some strange reason. Below is a list that I collected some years ago when I evaluated this.

Remember that this function is called at connect time. Meaning no query text.

  • ORIGINAL_DB_NAME()
  • HOST_NAME()
  • APP_NAME()
  • SUSER_NAME(),
  • SUSER_SNAME()
  • IS_SRVROLEMEMBER()
  • IS_MEMBER()
  • LOGINPROPERTY()
  • CONNECTIONPROPERTY()
0

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service and acknowledge you have read our privacy policy.

Not the answer you're looking for? Browse other questions tagged or ask your own question.