469,622 Members | 1,445 Online
Bytes | Developer Community
New Post

Home Posts Topics Members FAQ

Post your question to a community of 469,622 developers. It's quick & easy.

howto check the sql server edition from code

Hi,

I want to create a tool that run over Windows Server 2003 and checks
the sql server 2000 edition (Enterprise, Standard, Personal,
Developer).
I know I can do from the query analyzer - "Select @@version".
But how can I do it from code, is there a WMI API that can tell me
what's the edition?

Thanks,
Koby

Jul 23 '05 #1
4 6117
Why can't you issue SELECT @@VERSION from your code? It seems that
there is no registry entry that gives this information so AFAIK the
easiest way is to open a connection to the server and query the value
of @@VERSION or SERVERPROPERTY('Edition').

--
David Portas
SQL Server MVP
--

Jul 23 '05 #2
But how can I do it from code

What do you mean by it, FronEnd?

Madhivanan

Jul 23 '05 #3
TSQL: serverproperty('Edition')
SQLDMO: SQLServer2.VersionString
WMI: MSSQL_SQLServer.VersionString

The WMI provider documentation is on the CDROM, with the provider
itself, but you can just extract the wmisql.chm from the .cab file if
that's all you need.

Simon

Jul 23 '05 #4
Ray
I'm not a WMI programmer but you might look at the
Scripting.FileSystemObject object and use if it has anything for the product
version information. In Windows Explorer if you right click and get the
property information on the file MSSQL\Binn\sqlservr.exe click the version
tab and look at product information. This will give you the build number of
the exe.

Ray
"gokoby" <go****@gmail.com> wrote in message
news:11*********************@f14g2000cwb.googlegro ups.com...
Hi,

I want to create a tool that run over Windows Server 2003 and checks
the sql server 2000 edition (Enterprise, Standard, Personal,
Developer).
I know I can do from the query analyzer - "Select @@version".
But how can I do it from code, is there a WMI API that can tell me
what's the edition?

Thanks,
Koby

Jul 23 '05 #5

This discussion thread is closed

Replies have been disabled for this discussion.

Similar topics

8 posts views Thread by Topper | last post: by
14 posts views Thread by Developer | last post: by
2 posts views Thread by Earl | last post: by
reply views Thread by devrayhaan | last post: by
By using this site, you agree to our Privacy Policy and Terms of Use.