Scom SQL 2012 Discovery Managment Pack error . Variable not defined


Alert: message is Variable not defined ‘EVENT_TYPE_ERROR’ C:\Program Files\Microsoft Monitoring Agent\Agent\Health Service State\Monitoring Host Temporary Files 104\4529\SQLAgentJobDiscovery.vbs(293, 9) Microsoft VBScript runtime error: Variable is undefined: ‘EVENT_TYPE_ERROR’


The variable is really not defined inside the management pack and Option Explicit is set so variables must be defined. (ManagamentPack Bug). As the variable is only used if Access is denied the error is not allways showing up.

Else If DoJobDiscovery(ServiceName, InstanceName, ConnectionString, oSQLDiscoveryData, TcpPort) < 0 Then

oAPI.LogScriptEvent “SQLAgentJobDiscovery:” & InstanceName, SCRIPT_EVENT_ID, EVENT_TYPE_ERROR, “SQL Agent Job for SQL instance ‘” + InstanceName + “‘ discovery failed.” End If End If


Fix the management Pack Microsoft.SQLServer.2012.Discovery Or Fix the reason the discovery cant read the jobs in your SQL DB. Give the runas account rights or add sysadmin right to NT Authority\system as it was before on SQL 2008.

This entry was posted in Fix IT and tagged , , . Bookmark the permalink.

Comments are closed.