Symantec Management Platform (Notification Server)

 View Only
  • 1.  [NS Server 7.1 and 7.5] Informations about task status

    Posted Jan 28, 2016 03:59 AM

    Hello,

    I need to get information about specific tasks and jobs run datetime and status (success, in progress, failed) from Symantec_CMDB database.

    Which tables and views shall I use ?

    Best regrets



  • 2.  RE: [NS Server 7.1 and 7.5] Informations about task status
    Best Answer

    Posted Jan 28, 2016 07:42 AM

    I have found this sql query helpfull. Just change the task name. You even get the output data if the task has some return value.

    Declare @TaskName varchar(255)
    
    Declare @ComputerName varchar(255)
    
    Set @TaskName = 'Update Package Servers Configuration'
    
    Set @ComputerName = '%'
    
     
    
    select    vc.name 'Client Name'
    
            , i.name 'Task name'
    
            , tir.endtime 'Instance EndTime'
            ,tir.Result
    
            , 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.name like @TaskName
    
        and vc.name like @ComputerName
    
      order by tir.endtime, i.name  --, v.name --, iv.version,

     



  • 3.  RE: [NS Server 7.1 and 7.5] Informations about task status

    Posted Jan 28, 2016 09:32 AM

    Thaks a lot -> this did solved the problem.