How can you detect if your sql-server 2005 instance is a 32 or 64 bit instance from C# code? If you know some documentation on this issue, please let me know.. Thanks!
views:
223answers:
2Optimizations fine tuning..
E.
2008-11-06 16:36:57
+1
A:
Use SERVERPROPERTY ( propertyname )
With property name Edition.
64-bit versions of the Database Engine append (64-bit) to the version.
SELECT SERVERPROPERTY ( 'Edition' )
For me on my x64 machine returns the following string value: Enterprise Edition (64-bit)
You could also check the env variable PROCESSOR_ARCHITECTURE to see what the machine itself is running as.
Brian R. Bondy
2008-11-06 16:31:58
Is this listed also on the registry or can be concluded from a file version? I need a way to do this not assuming I have a valid connection.
E.
2008-11-06 16:38:02
updated answer with PROCESSOR_ARCHITECTURE note. I'm not 100% sure if you can install an x86 SQL on an x64 though. But I don't think you can.
Brian R. Bondy
2008-11-06 16:48:20