SYSADMIN.FailedObjects view: 'name' field format.
Why is the format of the NAME field for the records of type 'RecOpt' different? RecOpt records are named in double quotes, all others are not. Is it intentional?
-
Comment actionsOfficial comment
Hi Pavel,
we are using the MatchDescriptor field from SYSADMIN.RecommendedOptimizations. Bespoke field is quoted automatically by DV Server, to prevent matches on SQL language elements, a good example is DATE, which can be a data type but is a popular column name as well.
I added the internal definition of failedObjects for a better understanding where the data is coming from. The intention is to compare all failed objects before and after an update, for this purpose we do not consider the quoting to be relevant.
SELECT name, translator AS details, 'DataSource' AS type
FROM "SYSADMIN.DataSources"
WHERE failed = true
UNION
SELECT name, properties AS details, 'Connection' AS type
FROM "SYSADMIN.Connections"
WHERE failed = true
UNION
SELECT name, failureReason AS details, 'View' AS type
FROM "SYSADMIN.ViewDefinitions"
WHERE state <> 'READY'
UNION
SELECT name, failureReason AS details, 'Proc' AS type
FROM "SYSADMIN.ProcDefinitions"
WHERE state <> 'READY'
UNION
SELECT "MatchDescriptor" AS name, 'sourceState: ' || "sourceState" || ', sourceStateComment: ' || "sourceStateComment" || ', ' || "dwhStateComment" || ', lastReplicationState: ' || "lastReplicationState" || ', lastReplicationStateComment: ' || "lastReplicationStateComment" AS details, 'RecOpt' AS type
FROM "SYSADMIN.RecommendedOptimizations"
WHERE "sourceState" <> 'OK' OR "dwhState" <> 'OK' OR "lastReplicationState" <> 'OK'
UNION
SELECT "description" AS name, 'jobType: ' || "jobType" || ', lastExecutionStatus: ' || lastExecutionStatus || ', lastExecutionFailureReason: ' || "lastExecutionFailureReason" AS details, 'Job' AS type
FROM "SYSADMIN.ScheduleJobs"
WHERE "lastExecutionStatus" <> 'SUCCESS'
ORDER BY type;;As it can be seen, we are not modifying the info we get from DV Server here.
If I may ask, is the naming creating challenges for you? Should the quotes be removed?
Also, please let me know if there are any questions.
Best,
Matthias
Please sign in to leave a comment.
Comments
1 comment