When managing a large SQL Server environment you probably have different versions, levels, and editions of SQL Server running throughout. A nice quick way to extract this information is to use the script below:
SELECT @@SERVERNAME AS 'ServerName', SERVERPROPERTY('productversion') AS 'Version', SERVERPROPERTY ('productlevel') AS 'VersionLevel', SERVERPROPERTY ('edition') AS 'Edition'
This works for SQL 2000, SQL 2005, and SQL 2008. (I haven’t tested on versions of SQL Server previous to 2000). If you’re using SQL Server 2008 and a Central Management Server you can run this script against all your SQL Servers at once. If you are not using a Central Management Server you can create an SSIS package to loop through your servers and execute the script vs. each.
I’ll try and write a blog about Central Management Server in SQL Server 2008 as it’s a pretty cool new feature that has been added since 2005.


