Microsoft SQL Query - Endpoints flagging with errors

Hello. 

Can anyone help me in writing an query that will bring back all machines that are flagging with Sophos errors. 

Any help will be appreciated. 

Thanks, 

Will Janes. 

  • Hello Will Janes,

    flagging with Sophos errors
    in principle all errors are Sophos errors, aren't they? Could you give a more detailed description what you want to do?
    If you have the Management Studio take a look at the ComputerListWithErrorsAndAlerts table valued function.

    Christian

  • In reply to QC:

    Hello Christian, 

    On the Sophos console you are able to filter, 'Managed Computers with outstanding Sophos product errors'

    I would like to run some SQL to display this through a script or such alike. 

    Thanks, 

    Will Janes.  

  • In reply to Will Janes:

    Hello Will Janes,

    basically

    SELECT DISTINCT ac.Name, ac.ID
     FROM dbo.AliveComputers ac WITH (NOLOCK)
        WHERE ac.Managed=1 AND
         (   ac.LastAUErrorAlert  IS NOT NULL
          OR ac.LastSAVErrorAlert IS NOT NULL
          OR ac.LastSCFErrorAlert IS NOT NULL
          OR ac.LastPmaErrorAlert IS NOT NULL
          OR ac.LastSEAErrorAlert IS NOT NULL
          )

    should return the same computers as the console.

    Christian

  • In reply to QC:

    Thanks Christian.