Microsoft.SqlServer.Management.Smo.Wmi.ManagedComputer does not always return all services - by Chrissy LeMaire

Status : 

 


4
0
Sign in
to vote
ID 1403937 Comments
Status Active Workarounds
Type Bug Repros 0
Opened 6/5/2015 3:15:21 PM
Access Restriction Public

Description

SqlWmiManagement does not always return all services, though it always finds all ServerInstances.

This issue not only impacts SQL Server 2016, but previous versions as well. 

# Missing results
Add-Type -AssemblyName "Microsoft.SqlServer.SMO, Version=10.0.0.0, Culture=neutral, PublicKeyToken=89845dcd8080cc91"
Add-Type -AssemblyName "Microsoft.SqlServer.SqlWmiManagement, Version=10.0.0.0, Culture=neutral, PublicKeyToken=89845dcd8080cc91"

# Only one that works consistently
Add-Type -AssemblyName "Microsoft.SqlServer.SMO, Version=11.0.0.0, Culture=neutral, PublicKeyToken=89845dcd8080cc91"
Add-Type -AssemblyName "Microsoft.SqlServer.SqlWmiManagement, Version=11.0.0.0, Culture=neutral, PublicKeyToken=89845dcd8080cc91"

# Missing results
Add-Type -AssemblyName "Microsoft.SqlServer.SMO, Version=12.0.0.0, Culture=neutral, PublicKeyToken=89845dcd8080cc91"
Add-Type -AssemblyName "Microsoft.SqlServer.SqlWmiManagement, Version=12.0.0.0, Culture=neutral, PublicKeyToken=89845dcd8080cc91"

I have tested this against several different versions of SQL Servers (SQL 2005/2008/2012/2014/2016/Clustered/Nonclustered/DefaultInstance/NamedInstance), and tried 32-bit and 64-bit via ProviderArchitecture and directly loading the 32-bit DLL. I cannot find a consistent pattern as to which server will fail. I've tested this using PowerShell on both Windows 8.1 and Windows Server Technical Preview.

See similar issue here:
https://social.msdn.microsoft.com/Forums/sqlserver/en-US/cafb4d7e-fb6b-4253-be9f-7bcaa58bfc0e/why-would-smo-wmi-not-return-sql-2012-services-in-the-managedcomputerservices-collection-when-the?forum=sqlsmoanddmo

Thanks!
Sign in to post a comment.
Posted by Chrissy LeMaire on 12/13/2015 at 11:31 AM
Sethu,
Thanks for the follow-up. At this time, I am unable to reproduce the problem in SQL 2016 CTP 3.1 SMO. My servers have changed a bit, however. I'll keep at it and will update you if I run into a server that does not return the expected results.
Posted by Microsoft on 12/7/2015 at 7:43 PM
Chrissy,
Can you please check if you see this issue in SQL 2016 CTP 3.1 ?

Thanks
Sethu Srinivasan [MSFT]
SQL Server