AppWorx, Dollar Universe and Sysload Community

Expand all | Collapse all

Supplying a secondary login when requesting a job

Jump to Best Answer
  • 1.  Supplying a secondary login when requesting a job

    Posted 09-20-2018 09:52 AM

    does anyone know if there's a method available to provide both primary and seconday DB login details when requesting a module ?

     

    neither the 'REQUEST JOB' condition action nor the awop_api.awrun procedure seem to have the facility to accept a secondary login...

     

    any help would be appreciated..

     

    thanks



  • 2.  Re: Supplying a secondary login when requesting a job

    Broadcom Employee
    Posted 09-24-2018 02:19 PM

    Hello,

     

    From your post description, I am not sure if you are aware that a Job can be defined with a primary and secondary login in the Execution Options Tab of a Job definition, so I thought I would first provide this information. Below is a link to our documentation covering this:

     

    Development Guide > Creating Jobs > Entering Execution Options for Jobs

     

    If you are doing a request Job condition, the "DB Login" field is optional so you can leave it blank. If this is blank the Login that is used should default back to what is listed in the Automation Engine Option which should include both the primary and secondary login. This should apply to the awop_api.awrun as well if you omit the login parameter.

     

    Regards,

    Phearith



  • 3.  Re: Supplying a secondary login when requesting a job
    Best Answer

    Posted 09-26-2018 02:44 PM

    Hi Phearith,

     

    thanks for confirming

     

    the problem i was trying to solve was how to setup a job to create fixed user database links using the primary login to set the database the link was to created in, and the secondary login to obtain the username/password required as part of the dblink definition

     

    the context to the problem relates to rebuilding all the database links in a database after it's been refreshed from a production copy - we can obtain the names of the databases that the dblinks should connect to, and the usernames the links need to be setup with, so all we need is the passwords in order to rebuild the links.  Conveniently, we have AM dblogins defined for all these user

     

    After a bit of thought i settled on using the awapi.aw_module and aw_module_prompts  procedures to dynamically create a job with the appropriate primary and secondary logins set and then submit it using awop_api.awrun

     

    regards

    Pat