I am running SQL Server 2005 but I am unsure which edition this is. How can I decide what edition (Express, Standard, Enterprise etc) is running on the machine?
Click Start > All Programs > Accessories > Command Prompt. At the command line, type regedit.exe. Note: By default, SQL Server Express instances are named sqlexpress, but this value may be different if another name was used when SQL Server Express was installed.
select @@version
Sample Output
Microsoft SQL Server 2008 (SP1) - 10.0.2531.0 (X64) Mar 29 2009 10:11:52 Copyright (c) 1988-2008 Microsoft Corporation Developer Edition (64-bit) on Windows NT 6.1 (Build 7600: )
If you just want to get the edition, you can use:
select serverproperty('Edition')
To use in an automated script, you can get the edition ID, which is an integer:
select serverproperty('EditionID')
I use this query here to get all relevant info (relevant for me, at least :-)) from SQL Server:
SELECT
SERVERPROPERTY('productversion') as 'Product Version',
SERVERPROPERTY('productlevel') as 'Product Level',
SERVERPROPERTY('edition') as 'Product Edition',
SERVERPROPERTY('buildclrversion') as 'CLR Version',
SERVERPROPERTY('collation') as 'Default Collation',
SERVERPROPERTY('instancename') as 'Instance',
SERVERPROPERTY('lcid') as 'LCID',
SERVERPROPERTY('servername') as 'Server Name'
That gives you an output something like this:
Product Version Product Level Product Edition CLR Version
10.0.2531.0 SP1 Developer Edition (64-bit) v2.0.50727
Default Collation Instance LCID Server Name
Latin1_General_CI_AS NULL 1033 *********
You can get just the edition name by using the following steps.
screen shot
If you love us? You can donate to us via Paypal or buy me a coffee so we can maintain and grow! Thank you!
Donate Us With