Hi All,
Below is the error I get everytime I try to create a custom counter. I just updated to 8.5 and I am wondering if this is a bug or if my update broke something.
TITLE: Add Custom Counter
——————————
There was an error trying to add the custom counter. Please resolve the error and try again.
——————————
ADDITIONAL INFORMATION:
Error adding custom counter Number of IO Requests taking longer then 15 seconds for the last 24 hours (SQLdmManagementService)
——————————
Cannot insert the value NULL into column ‘ServerType’, table ‘SQLdmRepository.dbo.CustomCounterDefinition'; column does not allow nulls. INSERT fails.
The statement has been terminated. (Microsoft SQL Server, Error: 515)
For help, click: go.microsoft.com/fwlink
——————————
BUTTONS:
OK
——————————
Here is the SQL I am trying to collect.
The custom counter is a custom SQL script, that runs successfully when tested.
SQL Collected..
DECLARE @errorlog table
(
errdate DATETIME
,errproc SYSNAME
,errtext VARCHAR(4000)
)
INSERT INTO @errorlog
EXEC sp_readerrorlog 0, 1, ‘SQL Server has encountered’
INSERT INTO @errorlog
EXEC sp_readerrorlog 1, 1, ‘SQL Server has encountered’
SELECT COUNT(*) errcount FROM @errorlog WHERE [errdate] >= DATEADD(HOUR, -24, GETDATE())