How to get if SQL Server is 32 bit or 64-bit


  • Hi,

    I need to programatically check (during installation) if my SQL server is 32-bit (or processor architecture is x86) or 64-bit.
    SQL server can be 2005 or 2008.  
    I am using C#. SQL query will also help.

    When I do Select @@VERSION then I am getting this info:
    Microsoft SQL Server 2005 - 9.00.3042.00 (Intel X86)   Feb  9 2007 22:47:07   Copyright (c) 1988-2005 Microsoft Corporation  Enterprise Edition on Windows NT 5.2 (Build 3790: Service Pack 2)

    But I am not sure if this description is uniform across all the version of SQL server.

    Thanks in advance,
    Monday, March 02, 2009 4:01 PM


All replies

  • Hi Yogendrasinh,

    The results of SELECT @@VERSION are formatted uniformly across both SQL Server 2005 and 2008.  INTEL x86 is returned for machines running the 32-bit version, INTEL x64 is returned for 64-bit versions.

    Brian Knight - Mind Your Data Blog -
    Monday, March 02, 2009 4:27 PM
  • Also see the xp_msver:


    --4 Platform NULL NT x64

    Jens K. Suessmeyer
    • Marked as answer by yogendrasinh Tuesday, March 03, 2009 6:09 AM
    Monday, March 02, 2009 6:32 PM