Change accout string of sessions outside of your own

Database
Enthusiast

Change accout string of sessions outside of your own

Good Morning,

Our currectl WLM rules classify certain users based on account strings.  We give users an account string of say "hi_pri" which allows them to run at higher priority than other adhoc users This priority, however, comes with a daily CPU cap.  Once that cap is reached, users should no longer be eligible for the higher priority workload, and should rather fall into our regular adhoc user workloads, which have short / medium / long tiered workloads based on estimated query costs. .  The problem that I'm facing is if a user is currently logged on with a session that has a "hi pri" account string, even when we change the set of account strings in their profile to no longer include the "hi pri" account string as an option, the user will still have that account string until the session is logged off and the user logs back on.  

A solultion I've toyed with is to look for all sessions currently logged on by that user (or really profile member) and force all those sessions into our lowest tier adhoc user workload.  This forces any active request and any subsequent requests out of the higher priority workload.  However, this also has the side effect of forcing all subsetquent requests from that session into that lowest tiered adhoc workload, even if the requests would typically qualify as short or medium for a regular user.

To solve this, I would like to rather modify the account string of these sessions to classify naturally.  Something like SET ACCOUNT = "Normal" FOR userA FOR SESSION;

Any help, or ideasfor another way to handle this would be greatly appreciated!

Thanks.

2 REPLIES
Senior Apprentice

Re: Change accout string of sessions outside of your own

Changing the sesssion priority is possible using the SetSessionAccount function, check:

http://www.info.teradata.com/HTMLPubs/DB_TTU_15_00/Database_Management/B035_1090_015K/System_PMPC_AP...

Enthusiast

Re: Change accout string of sessions outside of your own

Perfect!  This is exactly what I was looking for, and thought I had looked in the docs for. :)

thanks again!!