PowerShell – SSMS v17 RC1 changes in SMO support for SQL Server vNext

v17_rc1_ssms

Download available now. Get it here:
https://msdn.microsoft.com/en-us/library/mt238290.aspx

Yes! The SQL Server Management Studio v17 RC1 is the one updated for SQL Server vNext on Linux. This version brings new properties in SMO object to properly identify SQL Server vNext. So, using previous version of SMO object under Information collection won’t give you the correct information.

wrongplatformgui_2016-11-08_18-29-36

When using SSMS v17 RC1 you’ll get the correct information:

ssms_rc_linux

Also, you will notice the following properties added to the SMO Object “Information” class. Running the following command will give you the total count of properties on the “Information” Class:

[sourcecode language=”powershell”]
($SQLSrvObj.Information | gm -MemberType Properties).count
[/sourcecode]

1. On SQL Server 2014 – “Information” Class has 47 properties.
2. On SQL Server vNext – “Information” Class has 54 properties.

Using a previous version SSMS, in SMO, if we use the “Platform” property to identify a Windows machine as “NT x64”, this won’t work on a Linux machine. it still will show “NT x64” even in the GUI.

powershell2sqlwindows

This is why we need to use SSMS v17 RC1. This have the needed changes to SMO to properly identify the Linux platform correctly.

powershell2sqllinux

Below is the list of added properties in the SMO “Information” class:

DatabaseEngineEdition
DatabaseEngineType
HostDistribution
HostPlatform
HostRelease
HostServicePackLevel
HostSku

As you can see, we’ll need to revisit our customs SMO scripts if you need do inventory on our SQL Servers on our infrastructure.

Remember! The fun never stop when you’re learning new stuff!