cancel
Showing results for 
Search instead for 
Did you mean: 

OpsCenter field name

ChetteB
Level 3
Partner Accredited

IHAC who wants to build a query to return all failed SQL jobs and include the database name. I have gotten that far.

The catch is...he wants it to also filter by retry attempt. He has jobs that fail on attempt one but finish on attempt 2.

He wants to filter those out. I know SQL well enough to write that query if I can find the database field to query by.

Any help is appreciated

1 ACCEPTED SOLUTION

Accepted Solutions

DG-2005
Level 5

Maybe something like this?

 

 

SELECT
id AS "Job ID",
clientname as "Name",
policyName AS "Policy Name",
(bytesWritten / 1024 / 1024) AS "MB Written",
attemptCount AS "Backup Attempts"
FROM domain_job
WHERE statusCode <> 0 AND attemptCount > 1 AND policyType=15

View solution in original post

1 REPLY 1

DG-2005
Level 5

Maybe something like this?

 

 

SELECT
id AS "Job ID",
clientname as "Name",
policyName AS "Policy Name",
(bytesWritten / 1024 / 1024) AS "MB Written",
attemptCount AS "Backup Attempts"
FROM domain_job
WHERE statusCode <> 0 AND attemptCount > 1 AND policyType=15