Wednesday, March 7, 2012

retrieve SQL Server version using SMO

How can I retrieve SQL Server version (SQL Server 2000 or 2005) using SMO ?, same manner as SERVERPROPERTY('ProductVersion')

ServerConnection object has a property ServerVersion, which can be used to determine the version of server connected.

|||Also take a look at the Server.Information class. This also carries a few properties, such as Version and VersionString, but also ProductLevel, and Edition.

No comments:

Post a Comment