Automic Workload Automation

 View Only
  • 1.  Finding inactive objects.

    Posted Feb 17, 2020 10:36 AM

    Hi all,

    We are still running on 11.2

    Is there an easy way of finding all objects in a certain client that is set to inactive? Preferably with a script-command, so that it can be scheduled.

     

     

    Best regards
    Jørn



  • 2.  RE: Finding inactive objects.

    Posted Feb 17, 2020 10:48 AM
    ​Hi,

    I'd start with something like this:

    select OH_NAME from OH where OH_CLIENT=10 and OH_OTYPE in ('JOBS', 'JOBP', 'SCRI') and OH_INACTIVE=1 and OH_NAME not like '%.OLD.%' and OH_DELETEFLAG=0;

    Adjust client number, and expand the list of object types as needed. I schedule such things with a command line SQL client and cron, but you could probably also put this into an SQL variable in Automic and then use the results in a script as needed.

    Hth,
    Carsten


  • 3.  RE: Finding inactive objects.

    Posted Feb 18, 2020 03:37 AM

    Thanks Carsten, but I was hoping I could do this without running a SQL statement.

    If this is the only solution I will give it a try.

     

    Best regards

    Jørn




  • 4.  RE: Finding inactive objects.
    Best Answer

    Posted Feb 18, 2020 01:08 PM
    I have a version of this query that also tells you who the last person was to modify the object.  (I wanted to know who probably inactivated it!)

    select oh_client
         , oh_name
    	 , oh_otype 
    	 , (select OH_Name
    	    from oh ss
    		where aa.oh_moduseridnr = ss.OH_Idnr and ss.oh_deleteflag = 0) as MODIFIED_BY
         , dateadd(hour, datediff(hour, getutcdate(), getdate()), OH_ModDate) as MODIFIED_DATE     
    from oh aa
    where oh_inactive = 1
    and oh_deleteflag = 0
    and oh_client = 411 --and oh_name like 'G%'
    order by 1, 2;​


    ------------------------------
    Pete
    ------------------------------



  • 5.  RE: Finding inactive objects.

    Posted Feb 18, 2020 01:14 PM
    And here is another one that finds inactivated workflow tasks;
    --jpp_active
    --  Value 0 = Inactive, no breakpoint
    --  Value 1 = active, no breakpoint
    --  Value 2 = inactive, breakpoint
    --  Value 3 = active, breakpoint
    
    -- FINDS INACTIVATED WORKFLOW TASKS
    select oh_client
         , oh_name as WorkflowWithBreakpoint
         , jpp_lnr as WorkflowTaskNumber
    from jpp, oh
    where oh_idnr = jpp_oh_idnr
    and   oh_deleteFlag = 0
    and   oh_client = 100
    and   jpp_Active in (0, 2)
    order by 1, 2, 3​


    ------------------------------
    Pete
    ------------------------------



  • 6.  RE: Finding inactive objects.

    Posted Feb 19, 2020 12:40 AM
    ​Great, Pete. Thanks for helping out!

    Jørn