How can you detect at runtime if your sql-server 2005 instance is a 32 or 64 bit instance?

How can you tell if your sql-server 2005 instance is a 32 or 64 bit instance from C # code? If you know of any documentation on this issue please let me know. Thank!

+1


source to share


1 answer


Use SERVERPROPERTY (property name)

The property name is Edition.

64-bit versions of the Database Engine application will add (64-bit) to the.



SELECT SERVERPROPERTY ( 'Edition' )

      

For me, the following string value is returned on my x64 machine: Enterprise Edition (64-bit)

You can also check the PROCESSOR_ARCHITECTURE env variable to see what the machine itself is running.

+2


source







All Articles