search cancel

How can a sql subvars dynamically use the login of the requestor.


Article ID: 90178


Updated On:


CA Automic Workload Automation - Automation Engine


How can a sql subvars dynamically use the login of the requestor.


Release: AOATAM99000-9.0-Automic-One Automation Tools-Application Manager


Detailed Description and Symptoms

I?n Application Mamanger (AM) sql subvars could dynamically use the login of the requestor. This allowed a single subvar to be used hundreds of times for different database connections. With V9 is there a way to dynamically change the connection value of a varable like with AM? 


A user can have a "Default login" and the Variable Object can be set to "Apply User's default Login".


You will need to create a static variable object and populate that object. In your SQL Variable object, you can call the staic variable (and key work is you nee to:
{VARA.STATIC} to call the variable
{VARA.STATIC, KEYWORD} to call the variable and keyword.
Now here you will need two jobs. the first job will populate the static variable object:
Then the second object to call and use the SQL Variable object.
:set &ajs# = get_var(VARA.SQL.NEW.1)
Then both jobs can be put into a process flow and set and user the object.

Then you would need to set up a schedule object and have that started as different users. Then the Schedule will start each job as that same user (requestor).