question

AlvaroSanchez-6615 avatar image
0 Votes"
AlvaroSanchez-6615 asked AlvaroSanchez-6615 commented

MSSQL 2008 Replication: An Error occurred during execution of the SQL Server 2008 Replication Management Pack managed module

Hi All,

I am receiving an error in SCOM related to Replication Discover Package. Could you have a look? Thank you so much.

Below is the complete message --->

Module: Microsoft.SQLServer2008.Replication.Module.Discovery.Discoveries.SubscriptionDiscovery

Version: 6.7.31.0

---------- Exception: ----------

Task finished with exception

at Microsoft.SQLServer.Replication.Module.Helper.Threading.WorkItem`1.GetResult(Int32 timeout, T& result)

at Microsoft.SQLServer.Replication.Module.Helper.Base.ModuleBasePropertyHelper`1.GetOutputData(DataItemBase[] inputDataItems)

at Microsoft.SQLServer.Replication.Module.Helper.ModuleBaseHelper`1.OnNewDataItems(DataItemBase[] dataItems, Boolean logicallyGrouped, DataItemAcknowledgementCallback acknowledgeCallback, Object acknowledgedState, DataItemProcessingCompleteCallback completionCallback, Object completionState)

in Microsoft.SQLServer.2008.Replication.Module.Helper

---------- Inner Exception: ----------

Got no valid result while trying to run WMI query 'SELECT Name, State, StartMode,PathName FROM Win32_Service WHERE Name like 'MSSQLSERVER'' for the path '\\SERVER01\Root\Cimv2'. Error persisted after 3 tries.

at Microsoft.SQLServer.Replication.Module.Helper.WMI.RetryPolicyWmiHelper.Query(String queryString)

at Microsoft.SQLServer.Replication.Module.Helper.WMI.CachedWmiHelper.Query(String queryString)

at Microsoft.SQLServer.Replication.Module.Helper.ModuleBaseHelper`1.IsAvaliableSqlEngine(String dataSource)

at Microsoft.SQLServer.Replication.Module.Helper.Base.ModuleBasePropertyHelper`1.SafelyOpenSqlConnection(String dataSource, SqlConnection& sqlConnection, Int32 timeout, Boolean rethrowNetworkRelatedExceptions, IEnumerable`1 filteredSqlErrorCodes)

at Microsoft.SQLServer2008.Replication.Module.Discovery.Discoveries.SubscriptionDiscovery.GetDistributorName(String publisherServerName)

at Microsoft.SQLServer2008.Replication.Module.Discovery.Discoveries.SubscriptionDiscovery.FillListsOfClassesAndRelations(SqlDataReader mReader)

at Microsoft.SQLServer.Replication.Module.Helper.ModuleBaseDiscoveryHelper.GetModuleData(DataItemBase[] inputDataItems)

at Microsoft.SQLServer.Replication.Module.Helper.Threading.WorkItem`1.<>c_DisplayClass6.<.ctor>b_4()

at Microsoft.SQLServer.Replication.Module.Helper.Threading.WorkItem.<>c_DisplayClass2.<Execute>b_0(Object state)

in Microsoft.SQLServer.2008.Replication.Module.Helper

The configuration properties are :

PrincipalName = SERVER02

InstanceName = MSSQLSERVER

ClassId = 6a25d707-81c5-3355-abd3-cd20351c63a4

SubscriptionDatabaseRelationshipId = d1316e8b-2198-8db4-d8bd-a5f346b833b4

SqlDatabaseClassId = 10c1c7f7-ba0f-5f9b-c74a-79a891170934

DiscoverySourceObjectId = 8e2c0338-cc02-3f9d-87eb-d46e4e436eda

DiscoverySourceManagedEntityId = 382a4e18-ea22-a6db-f9c9-4edfa00d66b9

SqlTimeout = 15

ConnectionString = SERVER02

TimeoutSeconds = 300

Publisher = Replication2008

msc-operations-manager
5 |1600 characters needed characters left characters exceeded

Up to 10 attachments (including images) can be used with a maximum of 3.0 MiB each and 30.0 MiB total.

1 Answer

LeonLaude avatar image
0 Votes"
LeonLaude answered AlvaroSanchez-6615 commented

Hi @AlvaroSanchez-6615,

Is this alert happening often? Is it happening to many servers? If it's only on one (1) server, I would try flushing the agent's cache.

Also are you able to run the WMI query directly on the targeted server?

This is the WMI query it's trying to run:

 SELECT Name, State, StartMode,PathName FROM Win32_Service WHERE Name like 'MSSQLSERVER'

There's been many people with this similar error in many SQL Server management packs, not sure if its a bug or not, here's a different forum thread with the same issue:

(If the reply was helpful please don't forget to upvote or accept as answer, thank you)


Best regards,
Leon

· 8
5 |1600 characters needed characters left characters exceeded

Up to 10 attachments (including images) can be used with a maximum of 3.0 MiB each and 30.0 MiB total.

Hi Leon,

Thank you for your reply.

It is in some servers.

I tried to run the query SELECT Name, State, StartMode,PathName FROM Win32_Service WHERE Name like 'MSSQLSERVER' but it did an error.
35458-error-scom.png


0 Votes 0 ·
error-scom.png (28.9 KiB)

To query the WMI in PowerShell, you need to use the Get-WmiObject PowerShell cmdlet.

For example:

 Get-WmiObject -Namespace root/cimv2 -Query "SELECT Name, State, StartMode,PathName FROM Win32_Service WHERE Name like 'MSSQLSERVER'"



0 Votes 0 ·

35410-error-scom.png




Now It is working fine.

0 Votes 0 ·
error-scom.png (36.3 KiB)

I have seen that the path is \\SERVER01\root\cimv2.
35471-error-scom.png



In my case SERVER02 is the subscriber and SERVER01 is the publisher.

0 Votes 0 ·
error-scom.png (183.8 KiB)
Show more comments