Client Management Suite

 View Only
  • 1.  Report of the machines that executed the invFULL task

    Posted Jun 02, 2017 01:32 PM
    How to create a sql report to identify which machine ran the InvFull task?


  • 2.  RE: Report of the machines that executed the invFULL task

    Broadcom Employee
    Posted Jun 05, 2017 06:40 AM

    You can use default "Collect Full Inventory" policy and switch it to see computers where Full inventory is done or isn't yet.

    FULL INVENTORY_0.jpg



  • 3.  RE: Report of the machines that executed the invFULL task

    Posted Jun 05, 2017 09:19 AM

    I found the solution below

    Note: Set @TaskName = '135eade3-1805-4b1c-8d0e-b21bc69beb47' = Guid do InvFull

     

     

    use Symantec_CMDB

    Declare @TaskName varchar(255)

    Declare @ComputerName varchar(255)

    Set @TaskName = '135eade3-1805-4b1c-8d0e-b21bc69beb47'

    Set @ComputerName = '%'

     

    select    vc.name 'Client Name'

            , i.name 'Task name'

            , tir.endtime 'Instance EndTime'

            , case tis.instancestatus

                when 0 then 'Not started'

                when 1 then 'Started'

                when 2 then 'Completed'

                when 3 then 'Failed'

                when 4 then 'Stop Requested'

                else 'unknown'

              end 'Instance Status'

            , topv.value 'Instance Output Text'

      from item i 

      join itemversions iv on iv.itemguid = i.guid

      join taskinstances ti on ti.taskversionguid = iv.versionguid

      join vcomputer vc on ti.resourceguid = vc.guid

      left join taskinstancestatus tis        on tis.taskinstanceguid = ti.taskinstanceguid

      left join taskinstanceresults tir    on tir.taskinstanceguid = ti.taskinstanceguid

      left join TaskOutputPropertyValue topv on topv.taskinstanceguid = ti.taskinstanceguid

      where 

        i.Guid like @TaskName

        and vc.name like @ComputerName

      order by tir.endtime, i.name  --, v.name --, iv.version,