2008-05-11

How to know SQL Server version and SP

Many time I stuck with a question… what is this DB Server version and what Service pack is installed on it? What is the easiest way to know DB edition? I asked this question to a friend of mine and he gave me the following simple Select statement that answered my questions.

--------------------

SELECT SERVERPROPERTY('productversion') AS version

, SERVERPROPERTY ('productlevel') AS SP

, SERVERPROPERTY ('edition') AS DbEdition

--------------------

I hope you will find it useful :)

1 comment:

Syed Mehroz Alam said...

Nice. And if you notice, the SQL server version and the service pack info is also displayed in the Status Bar of a query window in SQL Server 2005 Management Studio.


Regards,
Syed Mehroz Alam
http://smehrozalam.wordpress.com