Automic Workload Automation

  • 1.  Trouble with bind parameters in SEC_SQL

    Posted Jan 09, 2018 12:10 PM
    Hi All,

    I am working on an Automic workflow that can push software to various others systems in our infrastructure using API integration with our S/W Delivery system. Although it works fine, we realize that for every system that a s/w needs to be pushed to, we need an API call to fetch the "system-id". This is causing the number of API calls to escalate very quickly in some scenarios.

    The other option I have is to get the "system-id" from a SEC_SQL object instead of API calls. So I am trying something like this, with bind parameters from a vara having a serial number as key, and host-name as value1
    {VARA.TARGET_SERVERS, 1, 1}
    {VARA.TARGET_SERVERS, 2, 1}
    {VARA.TARGET_SERVERS, 3, 1} etc

    SELECT convert(nvarchar(450), cast(uuid as uniqueidentifier)) as uuid, label 
    FROM   dbo.discovered_hardware 
    WHERE label in (?,?,?)

    If I modified the query to take a max of 20 names at a time, is there a way I can bind values 1-20 from vara, then use 21-40 and so on, until I exhaust the list of entries?


  • 2.  Trouble with bind parameters in SEC_SQL

    Posted Jan 09, 2018 12:11 PM
    Forgot to include my name in the post - Latha Vijayagopal


  • 3.  Trouble with bind parameters in SEC_SQL

    Posted Jan 09, 2018 05:59 PM
    I would consider having the SEC_SQL return a list of all of the available rows from discovered_hardware, then use the UC4 scripting language to walk through that list using PREP_PROCESS_VAR() to match it to the list in your variable.


  • 4.  Trouble with bind parameters in SEC_SQL

    Posted Jan 09, 2018 06:00 PM
    ...or use PREP_PROCESS_VAR() against VARA.TARGET.SERVERS and invoke the SEC_SQL inside of the process loop.  I'm not sure which way would perform better?  Probably the first idea because you'd only have to execute a single SQL statement.  Would depend upon how many rows are in that table.


  • 5.  Trouble with bind parameters in SEC_SQL

    Posted Jan 10, 2018 09:27 AM
    petwir
     Thanks Pete. Will definitely try your first suggestion.


  • 6.  Trouble with bind parameters in SEC_SQL

    Posted Jan 11, 2018 09:44 AM
    @Pete Wirfs 
    I used the SEC_SQL to get everything into a VARA, and then some scripting to compare existing the VAR on-demand. This approach works beautifully. Thank you!