
Quote: |
We have many SQL 2000 server, that is not setup as a distributor or a publisher. It is not involved in replication. we we have been seeing a bunch of connections on the server from user NT AUTHORITY/SYSTEM application SQLDMO executing exec sp_helpdistpublisher @check_user = 1 a number of times. Why would it be doing that, when the server is not setup for replication. One more thing.. We have MOM2005 SP1 would this be related.. ??
I’m getting the same problem. After installing the new SQL MP the connections arn’t released. So I started the query analyzer. Exec a sp_who2. The process names where all SQLDMO_ and the SQL statement was exec sp_helpdistpublisher @check_user = 1 . I started a SQL profiles and monitored the server for a while. Then i did a search string with “exec sp_helpdistpublisher @check_user = 1”. On the match record i looked at the “clientProcessID” . Then i looked in the system task manager what process has this PID. And yes it was the “MOMHost.exe”. So YES it is MOM releated. I’m going to see whats the solution. Found it on the inet:
Quote: RESOLUTION:
Ok this solves the problem. I pasted the 05.0.2746.0000 script below:
‘——————————————————————- option explicit ‘Event Constants Const PROBLEMSTATE_NOTSET = 0
Dim g_oSQL Sub Main() Dim oParams, bInformationEvent, aInstances, sMsgActive Set g_oSQL = New SQL Set oParams = ScriptContext.Parameters aInstances = Split(g_oSQL.GetSQLInstances(),”,”) CheckReplicationFailures aInstances(i) End Sub
strDatabaseName = “distribution” sName = g_oSQL.GetSQLName(sInstance) If sName <> “” Then If sInstance = “MSSQLSERVER” Then Set cnADOConnection = MomCreateObject(“ADODB.Connection”) on error resume next ’SELECT Set rsSQLReplicationFailures = cnADOConnection.Execute(strQuery) Do While rsSQLReplicationFailures.EOF = False sMessage = “The SQL Server Replication Agent (” & rsSQLReplicationFailures(“name”).Value & “) has failed. Details: ” & rsSQLReplicationFailures(“comments”).Value g_oSQL.CreateAlert ALERT_CRITICAL_ERROR, _ rsSQLReplicationFailures.MoveNext End If Set cnADOConnection = Nothing Dim g_aDatabaseExcludeArray Const SQL_CLASS_ID = “SQL” Const SQL_SQL_SERVER_INSTANCE_NAME_ATTRIBUTE_ID = “SQL Server Instance Name” Const SQL_LOG_SPACE_COMPONENT_ID = “Log Space” ‘****************************************************************************** Class SQL HKEY_LOCAL_MACHINE = &H80000002 SERVICESTATE_GREEN = 0 Set m_oSafeRegistry = New SafeRegistry ‘****************************************************************************** Dim sWQLNameList End Function ‘****************************************************************************** CreateSQLInstanceArray = aInstances ‘****************************************************************************** ‘****************************************************************************** ‘****************************************************************************** Select Case IsSQLServiceStarted(sInstance) Const DB_CONNECTION_NO_SERVICE_MESSAGE = “The SQL Server service ({ServiceName}) {FailureReason}.”
Dim sInstances Call g_oUtil.LogMessage(g_oUtil.DBG_TRACE, “GetSQLInstances returning the following instances: ” & sInstances) GetSQLInstances = sInstances End Function
If Left(ReadRegistryStringValue(SQL_KEY_VER, “CurrentVersion”, ScriptContext.TargetComputer),4) = “7.00” Then End Function ‘****************************************************************************** Dim sKeyValue End Function ‘****************************************************************************** Dim sKeyValue End Function ‘****************************************************************************** Public Function IsClustered(sInstance) Dim sClusterName
Public Function IsSQLServiceStarted(sInstance) ‘****************************************************************************** Public Function IsServiceStarted(sServiceName) Dim oService, sObjectString ‘****************************************************************************** ‘****************************************************************************** Public Function GetSQLServiceName(sInstance) ‘****************************************************************************** Public Function GetSQLName(sInstance) If IsClustered(sInstance) Then Call g_oUtil.LogMessage(g_oUtil.DBG_TRACE, “GetSQLName returns: ” & GetSQLName) End Function
If sInstance = SQL_DEFAULT Then End Function
dim oSQLServer, sPath, oResults, sName On Error Resume Next sName = GetSQLName (sInstance) Set oSQLServer = MomCreateObject(“SQLDMO.SQLServer”) sPath = GetSQLInstanceName(sName, sInstance) oSQLServer.Connect sPath On Error Goto 0
Public Sub CreateEvent(iEventID, iEventType, sMessage) Dim oNewEvent ‘ Create a new event ‘ Set event properties ‘ Submit the event Set oNewEvent = Nothing End Sub ”****************************************************************************** ScriptContext.Submit oAlert ‘****************************************************************************** Dim oExcludeFile On Error Goto 0
Dim sInstanceDatabaseName For iArrayMembers = 0 To UBound(g_aDatabaseExcludeArray) If UCase(g_aDatabaseExcludeArray(iArrayMembers)) = UCase(sInstanceDatabaseName) Then End Function ‘****************************************************************************** Dim oExcludeFile On Error Goto 0
For iArrayMembers = 0 To UBound(g_aJobExcludeArray) If UCase(g_aJobExcludeArray(iArrayMembers)) = UCase(sServerJobName) Then End Function ‘****************************************************************************** Public Function ServiceStateUpdate(sStateToUpdate, sServiceName, sStateSource, sStateDescription, iHealthState) Dim lngProblemState Set oAlert = ScriptContext.CreateAlert() Select Case sStateToUpdate oAlert.ProblemState = iProblemState End Function
‘****************************************************************************** ‘****************************************************************************** End Class
HandleResult m_sHive, sKeyPath, sValueName, lResult Public Function ReadMultiStringValue(ByVal sKeyPath, ByVal sValueName, ByVal sHostName, ByRef lResult) HandleResult m_sHive, sKeyPath, sValueName, lResult Private Function GET_REGISTRY_VALUE_NOT_FOUND_MESSAGE(ByVal sHive, ByVal sRegKey, ByVal sRegValue) Private Function GET_ERROR_READING_REGISTRY_MESSAGE(ByVal sHive, ByVal sRegKey, ByVal sRegValue) Function GET_REGISTRY_KEY_NOT_FOUND_MESSAGE(ByVal sHive, ByVal sRegKey) Function GET_ERROR_READING_KEY_MESSAGE(ByVal sHive, ByVal sRegKey) Class Registry Public ERROR_ACCESS_DENIED Class Error Dim g_oUtil ‘========================================================================== ’ Used to say to LogMessage when/how to print the message. ’Internal Debug Level ’============= ’by default only errors are logged End Sub ’============= End Function ’=============
Function WMIGetObject(sNamespace) On Error Resume Next Set WMIGetObject = oWMI End Function Function WMIGetInstance(sNamespace, sInstance) On Error Resume Next Set oInstance = oWMI.InstancesOf(sInstance) ’Determine if we queried a valid WMI class – Count will return 0 or empty nInstanceCount = oInstance.Count Set WMIGetInstance = oInstance Set oInstance = Nothing End Function Function WMIExecQuery(sNamespace, sQuery) Set oQuery = oWMI.ExecQuery(sQuery) ’Determine if we queried a valid WMI class – Count will return 0 or empty Set WMIExecQuery = oQuery Set oQuery = Nothing Function WMIGetInstanceNoAbort(sNamespace, sInstance) On Error Resume Next Set oInstance = oWMI.InstancesOf(sInstance) ’Determine if we queried a valid WMI class – Count will return 0 or empty Set WMIGetInstanceNoAbort = Nothing Set oInstance = Nothing End Function
Const ErrAction_None = 0 Function GetWMIProperty(oWmi, sPropName, nCIMType, ErrAction) If Not IsObject(oWmi) Then If (ErrAction And ErrAction_Abort) = ErrAction_Abort Then _ GetWMIProperty = “” On Error Resume Next If (ErrAction And ErrAction_Abort) = ErrAction_Abort Then _ If IsNull(sValue) Then Else Select Case (oWmiProp.CIMType) Dim sTmpStrDate ’ If (ErrAction And ErrAction_ThrowError) = ErrAction_ThrowError Then _ If (ErrAction And ErrAction_Abort) = ErrAction_Abort Then _ GetWMIProperty = “” End If
Function ThrowScriptErrorNoAbort(sMessage, oErr) Dim sErrDescription, sErrNumber On Error Resume Next Dim oScriptErrorEvent Set oScriptErrorEvent = ScriptContext.CreateEvent()
Michel |
2 comments
Please could you post a link to the source of this information, maybe the original Microsoft link, thanks.
Paul
Paul , Its is an original post. Anyway if you upgrade to the latest SQl MP the problem is sovled. Or you can copy and paste the code in my post. No changes are done so it’s save.
michel
michel [admin]