Only 4 on 13 Instances are found

Feb 17, 2015 at 5:10 PM
Hi

I have a server with 13 instances, 4 instance in 2008 (log on as localsystem) , 9 instance in 2012 (log on as virtual account).

when i execute this command, .\Get-SqlServerInventoryToClixml.ps1 -Computername MyServer -LoggingPreference Standard

Only 4 SQL 2008 instances are found.

Any idea ?
Coordinator
Feb 20, 2015 at 2:45 PM
What version of SMO is installed on the machine where you're running the scripts? Does the account you're running the scripts as have access to the instances that aren't being found?
Feb 24, 2015 at 4:35 PM
Hi Kendal

I think both SMO (2008,2012) are installed.

When I execute the powerdoc command from my desktop then only 4 SQL 2008 instances are found.
When I execute the powerdoc command from the sql machine then all instances are found.

Any Idea ?

Thanks.
Coordinator
Feb 24, 2015 at 9:08 PM
When both 2008 and 2012 SMO assemblies are on a machine sometimes the lower version of the assembly is the one that ends up being loaded. When the 2008 assemblies are loaded the 2012 instances aren't found.

The latest version of NetworkScan.psm1 that I committed today should fix this; I updated the module check the target machine's registry for instances in addition to using the ManagedComputer object in SMO.

Try replacing your copy with the latest version and let me know if all the instances are discovered.

Kendal
Feb 25, 2015 at 1:04 PM
Edited Feb 25, 2015 at 1:31 PM
Hi

Same result, Only 4 SQL 2008 instances are found.

I downloaded the lastest source, plus replaced the NetworkScan.psm1 with the last commit (as of commit 4af83ca09712, 16 hours ago).

When I execute the powerdoc command from my desktop then only 4 SQL 2008 instances are found. Only Sql Server 2008 R2 is installed on my desktop.

When I execute the powerdoc command from the SQL machine then all instances are found. Both Sql Server 2008 and 2012 are installed on the SQL machine.

Thanks
Coordinator
Mar 12, 2015 at 5:36 PM
Ok, that makes sense - officially Microsoft does not support forwards compatibility (see https://connect.microsoft.com/SQLServer/feedback/details/622441). This is why I call it out in the documentation: "You don't need the absolute latest version installed, but it's a good idea to make sure that the version you do have installed at least matches the highest version of SQL Server that will be included in your inventory". I should probably add some kind of warning message to the logs and/or console, too.

I refactored the NetworkScan module for the opposite reason - to find lower version of instances running side by side with more recent versions, e.g. SQL 2000 and 2005 on the same machine. However, the latest change I just committed should work the other way and find those 2012 instances. Can you grab the latest version of the NetworkScan module that I just committed and try that out one more time?

--Kendal