Automic Workload Automation

Expand all | Collapse all

How to work with JOBS/JOBP-aliases?

  • 1.  How to work with JOBS/JOBP-aliases?

    Posted 03-14-2018 12:03 PM
    Hi,

    I want to build one generic workflow for backing up several MSSQL databases/instances.
    So I have only three very generic jobs with some variables:
    LOGARCHIVE_DB_MSSQL#JOBS_WIN
    BACKUP_DB_MSSQL#JOBS_WIN
    BACKUP_FS#JOBS_WIN
    And I want to activate these jobs with aliases like, e.g.
    "LOGARCHIVE_DB_MSSQL#JOBS_WIN#HOSTNAMEXY"

    But I have the problem, that I can't control how many times the jobs are allowed to start in parallel. Functions like SYS_STATE_ACTIVE needs always the object-name and an alias is not possible.
    But I want to avoid to create a workflow/job for every single database/instance.

    Any ideas/help for me? Is it possible? With which version? We use version 9 and 10.

    Best regards
    Stephan


  • 2.  How to work with JOBS/JOBP-aliases?

    Posted 03-14-2018 04:12 PM
    To code this once and use it many times, write the generic solution so that it can be passed the required variables.  Then you can call it from multiple workflows, or multiple times from a single workflow, with different task variable overrides under task properties.  Under workflow task properties you can also assign alias names to your tasks.

    If you want to control how many times a single Automic object can run in parallel, use the "Max Number" option on the "Attributes" for the object.

    When I have multiple types of objects that should not run in parallel, I favor using a SYNC object which does not require them to run in any particular order.


  • 3.  How to work with JOBS/JOBP-aliases?

    Posted 03-15-2018 04:00 AM
    Hm,

    what about max parallel settings. Or am I missing something? This is available on Workflow and Job level.

    vvq948py7fqa.pnghttps://us.v-cdn.net/5019921/uploads/editor/ii/vvq948py7fqa.png" width="352">

    Regards, Matthias


  • 4.  How to work with JOBS/JOBP-aliases?

    Posted 03-15-2018 04:15 AM
    Hi


    Yeah you miss a little thing, the generic jobs will be started with different parameters:
    JOBS.COPY_SALARY_CONFIRMATION@IT@FEB2017
    JOBS.COPY_SALARY_CONFIRMATION@SALES@JAN2018
    JOBS.COPY_SALARY_CONFIRMATION@MARKETING@DEC2017
    JOBS.COPY_SALARY_CONFIRMATION@C_LEVEL_MGMT@FEB2025
    so you could have the limit, the job may run in arallel but not for one deparment

    to avoid this you can use seperate queues or - somwhere in community - I think I posted an SQL to detect all aliases used for a job - this could be used for a script solution....

    StephanMannert82415952
    we do this quite often and our solution was starting the jobs with aliases that must not run in parallel in a seperate queue ***_SEQUENTIAL - all others in ***_PARALLEL
    for this we devolped an include (running in all objects and checking its NAME + parameters in a VARA objects) and assigning the queue in prescript

    cheers, Wolfgang


  • 5.  How to work with JOBS/JOBP-aliases?

    Posted 03-15-2018 06:25 AM
    FrankMuffke
    Not shure if  I got that right, but looks like putting those 3 jobs in a workflow, giving that workflow an alias and setting max parallel = 1 will solve that too. Anyway, think we have to get more details from Stephan

    @Stephan Mannert
    Could you provide more info on what should and what should not run in parallel?