Automic Workload Automation

  • 1.  SQL Connection Objects

    Posted Apr 16, 2019 11:56 AM

    Can we use the SQL Connection Objects in a script?

    I have a sql connection object with credentials to a database and the password is not shared. Its being entered by the application team the first time and we use this object for all SQL jobs.

    Is there a way I can use this object in a script, just like I am using as a connection?

    AE Version: 12.0.1



  • 2.  Re: SQL Connection Objects

    Posted Apr 18, 2019 03:56 PM

    Hi

     

    Is there a way I can use this object in a script, just like I am using as a connection?

    Which script functions do you want to use in combination with the CONN object?

     

    cheers, Wolfgang



  • 3.  Re: SQL Connection Objects

    Posted Apr 18, 2019 04:07 PM

    I want to use it in a shell script to run a SQL through a SQLPLUS command.

    I was able to find the function : GET_CONNECTION and get the username and password. But the password is encrypted and the SQLPLUS is not liking it.



  • 4.  Re: SQL Connection Objects
    Best Answer

    Posted Apr 18, 2019 04:23 PM

    You'll have the run the encrypted password through the job messenger. eg. UC_JOBMD CMD=

     

    There should be quite a few community articles on this process



  • 5.  Re: SQL Connection Objects

    Posted Apr 23, 2019 03:17 PM

    Thank you , I was able to search using UC_JOBMD CMD and found the thread



  • 6.  Re: SQL Connection Objects

    Posted Apr 23, 2019 03:15 PM

    I was able to get the password and decrypt and use it in a script to run a SQLPLUS command.

    Thanks to this thread - https://communities.ca.com/thread/241801616 

    and Michael_Lowry : Thanks a ton for the answer