Automic Workload Automation

  • 1.  Draw information from the Automation Engines's database

    Posted Jan 25, 2017 03:02 AM
    We need to create a "runbook".
    But, there are some information which we do not know where to find in the database.
    Could you please let us know where to find in the db
    1. content of documentation tab for a specific job
    2.  "earliest start time" and calendar condition from the task properties of child objects inside jobflow

    1. This is stored in the ODOC table. However the content of the ODOC_Content column's content is encrypted and may not be accessed by a SQL query.

    Oracle:
     g65fbht67ogi.pnghttps://us.v-cdn.net/5019921/uploads/editor/wo/g65fbht67ogi.png" width="466">

    MS SQL:
    d7nvdcce9hsc.pnghttps://us.v-cdn.net/5019921/uploads/editor/0r/d7nvdcce9hsc.png" width="549">

    Besides interacting directly with the AE DB should be avoided when possible. Therefore we recommend to use PREP_PROCESS_DOCU instead.


    2. Not sure this is exactly what you're looking for, but here goes:

    A. Get calendar and keyword used in a workflow
    SELECT OH_Name, JPPC_CaleName, JPPC_CaleKeyName
    FROM OH, JPPC
    WHERE OH_Idnr = JPPC_OH_Idnr
    AND OH_Otype='JOBP'

    B. Get the earliest start time:
    SELECT OH_name, JPP_Object, JPP_ErlstStTime
    FROM OH, JPP
    WHERE OH_Idnr = JPP_OH_Idnr
    AND JPP_ErlstStTime IS NOT NULL
    Once again, I don't think A. is what you're looking for. However I'm pretty confident that somebody will read this post and come with a better proposition.

    Best regards,
    Antoine


  • 2.  Draw information from the Automation Engines's database

    Posted Jan 25, 2017 04:45 AM
    Update:

    The content of ODOC_CONTENT is binary type and can be converted with the CAST() SQL function:

    SQL Server:
    kklt00ne4wf5.pnghttps://us.v-cdn.net/5019921/uploads/editor/1i/kklt00ne4wf5.png" width="626">

    Oracle :

    You can use "UTL_RAW.CAST_TO_VARCHAR2(DBMS_LOB.SUBSTR())". However it is trickier as the results will return 'null' if:

    - Any input parameter is null.
    - Number of bytes < 1 -Number of bytes > 32767
    - Offset  < 1 -Offset  > LOBMAXSIZE

    The explanations here may help to figure a solution:
    http://www.dba-oracle.com/t_convert_blob_varchar_datatype.htm

    As mentioned before, please be extremely careful with those statements - have a DBA review them in a sandbox.
    The preferred solution should still be to use the script function PREP_PROCESS_DOCU to read the documentation tab's content.