Thursday, April 22, 2010

How to determine System and Server Information on SQL Server 2008

Definitely, you may know that the general system and server information is available on the General Page of the Server Properties dialog box. Using the information on the General Page, you can easily determine the following.
•    SQL Server edition
•    Operating system version
•    SQL Server version
•    Platform and chip architecture
•    Default language
•    Amount of RAM installed on the system
•    Number of CPUs
•    Root directory location for the selected instance
•    Default server collation

Moreover, you can get the similar information by using the extended stored procedure xp_msver.
You have to execute the following command.
exec xp_msver "ProductName", "ProductVersion", "Language", "Platform", "WindowsVersion", "PhysicalMemory", "ProcessorCount"

However, you may also use the SQL Server PowerShell, as given in the following example:
Invoke-Sqlcmd -Query "exec xp_msver 'ProductName', 'ProductVersion', 'Language', 'Platform', 'WindowsVersion', 'PhysicalMemory', 'ProcessorCount'" -ServerInstance "DataServer91\CorpServices"

By ,