Posted by: R Manimaran | November 12, 2010

SQL Server Find Version

I found how to get version of a SQL SERVER in different places in the internet. Here I have consolidated it in one place.

SQL Server: Different ways to know the version

1. using @@Version

Select @@version

2. using System Stored Procedure sp_server_info

Exec SP_Server_info

3. using Extended Stored Procedure xp_msver

Exec xp_msver

4. Using @@MicrosoftVersion

SELECT @@Microsoftversion, cast(@@Microsoftversion as binary(5))as version

Here in the version the output is 0x0009000577

Now extract first non zero character after ‘0x0’ from the binary value.

· If it is A which is represented in Hexadecimal format which denotes the number 10 so the version is 2008.

· If it is 9, the version is 2005

Advertisements

Leave a Reply

Fill in your details below or click an icon to log in:

WordPress.com Logo

You are commenting using your WordPress.com account. Log Out / Change )

Twitter picture

You are commenting using your Twitter account. Log Out / Change )

Facebook photo

You are commenting using your Facebook account. Log Out / Change )

Google+ photo

You are commenting using your Google+ account. Log Out / Change )

Connecting to %s

Categories

%d bloggers like this: