Attempting to add a UDC on different SQL servers spanning different versions and the query itself will verify correctly, I have set the key and all the types but it still will not appear in the UDC Overview screen.
The closest error I can find is:
2021-08-22 14:25:26.949 ERROR [SERVER.DOMAIN.COM-lowPriorityPool-1-[DBSS_Cust_Days_Since_Last_DBCC][2021/08/22 14:25:26]] com.quest.qsi.fason.core.collection.processor.InstanceProcessor - Failed to run DBSSCustomProcessor processor of DBSS_Cust_Days_Since_Last_DBCC collection.
java.lang.RuntimeException: Failed to execute collection [DBSS_Cust_Days_Since_Last_DBCC], reason=Not expected to get NULL object for result set
at com.quest.qsi.fason.core.collection.processor.AbstractQueryProcessor.handleError(AbstractQueryProcessor.java:340)
at com.quest.qsi.fason.core.collection.processor.AbstractQueryProcessor.execute(AbstractQueryProcessor.java:239)
at com.quest.qsi.fason.core.collection.processor.InstanceProcessor.execute(InstanceProcessor.java:169)
at com.quest.qsi.fason.sqlserver.collection.processor.DBSSInstanceProcessor.execute(DBSSInstanceProcessor.java:104)
at com.quest.qsi.fason.sqlserver.collection.processor.DBSSGeneralProcessor.execute(DBSSGeneralProcessor.java:39)
at com.quest.qsi.fason.core.collection.AbstractCollection.doRun(AbstractCollection.java:251)
at com.quest.qsi.fason.core.collection.AbstractCollection.run(AbstractCollection.java:295)
at java.util.concurrent.ThreadPoolExecutor.runWorker(ThreadPoolExecutor.java:1149)
at java.util.concurrent.ThreadPoolExecutor$Worker.run(ThreadPoolExecutor.java:624)
at java.lang.Thread.run(Thread.java:748)
Caused by: java.lang.RuntimeException: Not expected to get NULL object for result set
at com.quest.qsi.fason.sqlserver.collection.processor.DBSSCustomProcessor$DBSSCustomReader.doExecuteCustomSql(DBSSCustomProcessor.java:642)
at com.quest.qsi.fason.sqlserver.collection.processor.DBSSCustomProcessor$DBSSCustomReader.doExecuteSql(DBSSCustomProcessor.java:626)
at com.quest.qsi.fason.core.collection.reader.JdbcReader.executeSql(JdbcReader.java:70)
at com.quest.qsi.fason.core.collection.reader.JdbcReader.runQuery(JdbcReader.java:48)
at com.quest.qsi.fason.sqlserver.collection.reader.SqlServerJdbcReader.runQuery(SqlServerJdbcReader.java:251)
at com.quest.qsi.fason.core.collection.processor.AbstractQueryProcessor.runQuery(AbstractQueryProcessor.java:522)
at com.quest.qsi.fason.core.collection.processor.AbstractQueryProcessor.execute(AbstractQueryProcessor.java:187)
SQL query for the UDC is:
IF OBJECT_ID('tempdb.dbo.#temp', 'U') IS NOT NULL DROP TABLE #temp;
CREATE TABLE #temp( Id INT IDENTITY(1, 1), ParentObject VARCHAR(255), [Object] VARCHAR(255), Field VARCHAR(255), [Value] VARCHAR(255))
IF OBJECT_ID('tempdb.dbo.#DBCCres', 'U') IS NOT NULL DROP TABLE #DBCCres;
CREATE TABLE #DBCCRes( Id INT IDENTITY(1, 1) PRIMARY KEY CLUSTERED, DBName sysname, dbccLastKnownGood DATETIME, RowNum INT)
DECLARE @DBName sysname, @SQL VARCHAR(512);
DECLARE dbccpage CURSOR LOCAL STATIC FORWARD_ONLY READ_ONLY FORSELECT nameFROM sys.databasesWHERE name NOT IN ( 'tempdb' ) AND state_desc = 'ONLINE';
OPEN dbccpage;FETCH NEXT FROM dbccpageINTO @DBName;WHILE @@Fetch_Status = 0BEGIN SET @SQL = 'Use [' + @DBName + '];' + CHAR(10) + CHAR(13) SET @SQL = @SQL + 'DBCC Page ( [' + @DBName + '],1,9,3) WITH TABLERESULTS;' + CHAR(10) + CHAR(13)
INSERT INTO #temp EXECUTE (@SQL); SET @SQL = ''
INSERT INTO #DBCCRes ( DBName, dbccLastKnownGood, RowNum ) SELECT @DBName, Value, ROW_NUMBER() OVER (PARTITION BY Field ORDER BY Value) AS Rownum FROM #temp WHERE Field = 'dbi_dbccLastKnownGood';
TRUNCATE TABLE #temp;
FETCH NEXT FROM dbccpage INTO @DBName;END
CLOSE dbccpage;
DEALLOCATE dbccpage;
SELECT DBName, dbccLastKnownGoodFROM #DBCCResWHERE RowNum = 1 AND DATEDIFF(DD, dbccLastKnownGood, GETDATE()) > 10;
DROP TABLE #tempDROP TABLE #DBCCRes
Additional Information:
Version 5.9.7
Other UDC's work
This UDC does not work on any server
UDC's are enabled
Credentials for UDC are correct