The SMO library mirrors the enhancing features and functionality of SQL Server over time.
As a consequence, one can “reverse engineer” the evolution of SQL Server features by comparing the classes and enums residing in different versions Microsoft.SqlServer.Smo.dll and related assemblies.
Let’s have a look at the enumeration DatabaseObjectTypes, which is defined as
[Flags] public enum DatabaseObjectTypes : long
in Microsoft.SqlServer.Smo.dll:
enum | from | to |
---|---|---|
ApplicationRole = 0x1, | ||
ServiceBroker = 0x2, | ||
Default = 0x4, | ||
ExtendedStoredProcedure = 0x8, | ||
FullTextCatalog = 0x10, | ||
MessageType = 0x20, | ||
PartitionFunction = 0x40, | ||
PartitionScheme = 0x80, | ||
DatabaseRole = 0x100, | ||
RemoteServiceBinding = 0x200, | ||
Rule = 0x400, | ||
Schema = 0x800, | ||
ServiceContract = 0x1000, | ||
ServiceQueue = 0x2000, | ||
ServiceRoute = 0x4000, | ||
SqlAssembly = 0x8000, | ||
StoredProcedure = 0x10000, | ||
Synonym = 0x20000, | ||
Table = 0x40000, | ||
User = 0x80000, | ||
UserDefinedAggregate = 0x100000, | ||
UserDefinedDataType = 0x200000, | ||
UserDefinedFunction = 0x400000, | ||
UserDefinedType = 0x800000, | ||
View = 0x1000000, | ||
XmlSchemaCollection = 0x2000000, | ||
SymmetricKey = 0x4000000, | ||
Certificate = 0x8000000, | ||
AsymmetricKey = 0x10000000, | ||
UserDefinedTableTypes = 0x20000000, | ||
PlanGuide = 0x40000000, | ||
DatabaseEncryptionKey = 0x80000000, | ||
DatabaseAuditSpecification = 0x100000000, | ||
FullTextStopList = 0x200000000, | ||
SearchPropertyList = 0x400000000, | 110 | |
Sequence = 0x800000000, | 110 |
Everything stable since SMO 2005, except for SEQUENCES in SQL Server 2012 (110).
Note that the enum’s symbols match the names of the corresponding SMO classes, exception for UserDefinedTableTypes, which is represented by the class UserDefinedTableType.
SQL Server 2012 Azure (110) also introduced a feature called Federation:
enum | from | to |
---|---|---|
Federation = 0x1000000000, | 110 | 130 |
SecurityPolicy = 0x2000000000, | 130 | 130 |
ExternalDataSource = 0x4000000000, | 130 | 130 |
ExternalFileFormat = 0x8000000000, | 130 | 130 |
ColumnMasterKey = 0x10000000000, | 130 | 130 |
ColumnEncryptionKey = 0x20000000000, | 130 | 130 |
QueryStoreOptions = 0x40000000000, | 130 | 130 |
DatabaseScopedCredential = 0x80000000000, | 130 | 130 |
The Federation features has been dropped in SQL Server 2017 (140), causing all subsequent enumeration values to right-shift by 1 bit:
enum | from | to |
---|---|---|
SecurityPolicy = 0x1000000000, | 140 | |
ExternalDataSource = 0x2000000000, | 140 | |
ExternalFileFormat = 0x4000000000, | 140 | |
ColumnMasterKey = 0x8000000000, | 140 | |
ColumnEncryptionKey = 0x10000000000, | 140 | |
QueryStoreOptions = 0x20000000000, | 140 | |
DatabaseScopedCredential = 0x40000000000, | 140 | |
DatabaseScopedConfiguration = 0x80000000000, | 150 | |
ExternalLibrary = 0x100000000000, | 150 |
Finally, there is also the version-specific value All, which is the OR’ed value of all enum values.