Como saber la versión y service pack de nuestro SQL

by 7. junio 2009 16:59

Hay muchas veces que se necesita saber que edición, versión y service pack tenemos en nuestra instalación.

Para poder sacar esta información hay distintas formas, una de ellas es usar la siguiente query

 

SELECT @@VERSION 
 

Obteniendo como resultado el siguiente ejemplo

 

Microsoft SQL Server 2008 (SP1) - 10.0.2531.0 (Intel X86)
    Mar 29 2009 10:27:29
    Copyright (c) 1988-2008 Microsoft Corporation
    Developer Edition on Windows NT 6.0 <X86> (Build 6002: Service Pack 2)

 
Aquí podemos observar el tipo de edición (Developer) si es 32 o 64 bits, el nivel de Service pack del SO (SP2)
el build del SQL Server (10.0.2531.0) , su versión (SQL 2008) y hasta su service pack (SP1).
 
También podemos hacer esto mismo y además obtener mas información utilizando la función ServerProperty.
 
select SERVERPROPERTY('Edition') as Edicion,
       SERVERPROPERTY('ProductLevel') as ServicePack,
       
       case when
       
       substring(convert(varchar(15),
                 SERVERPROPERTY('ProductVersion')),
                 0,       
                 patindex('%.%',
                 convert(varchar(15),
                 SERVERPROPERTY('ProductVersion')))) = 8
       then '2000'           
       when 
       substring(convert(varchar(15),
                 SERVERPROPERTY('ProductVersion')),
                 0,       
                 patindex('%.%',
                 convert(varchar(15),
                 SERVERPROPERTY('ProductVersion')))) = 9
       then '2005'
       when 
       substring(convert(varchar(15),
                 SERVERPROPERTY('ProductVersion')),
                 0,       
                 patindex('%.%',
                 convert(varchar(15),
                 SERVERPROPERTY('ProductVersion')))) = 10
       then '2008' end as version,
       SERVERPROPERTY('Collation') as Collation,
       SERVERPROPERTY('InstanceName') as instancia
 
 

Tags:

How To

Comentarios

26/07/2009 16:10:54 #

Great job mate! I like your work. Thanks for sharing

wadin

26/07/2009 16:17:03 #

I learned a lot of about blogs, and your is a great of piece of them. Thanks to share

saradental

26/07/2009 17:28:47 #

You are so true on that! http://www.mrstiff.com

Sex search

26/07/2009 17:28:54 #

You are so true on that! http://www.mrstiff.com

Porn Search Engine

30/07/2009 7:20:56 #

I never realised this before, but you have a very good point indeed

Ass Licking

31/08/2009 14:36:44 #

Keep working ,great job!

bad credit loans United States

23/09/2009 0:50:25 #

Nice post! GA is also my biggest earning. However, it�s not a much.

payday loans United States

23/09/2009 0:50:28 #

Please, can you PM me and tell me few more thinks about this, I am really fan of your blog...gets solved properly asap.

payday loans United States

Maximiliano Damian Accotto