Link to home
Create AccountLog in
Avatar of Member_2_2131373
Member_2_2131373Flag for United Kingdom of Great Britain and Northern Ireland

asked on

Getting SQl server product string withut logging in?

Is it possible to retrieve the product string from an SQL server without logging in?

This is the string that states "Microsoft SQL Server Express Edition with Advanced Services" or similar, not the version number(although I would want that as well).

SERVERPROPERTY('productversion')
SERVERPROPERTY ('edition')

Return what I ened, but you need to be logged in.

I've a lot of servers that are required to be documented as to which version they are, but don't have log-in details for some.



Jim
Avatar of Armand G
Armand G
Flag of New Zealand image

Open sql server configuration manager or type: SQLServerManager10.msc from Start->Run to open the manager. Then go to SQL Services and select any SQL Server then right click -> properties. Then go to Advanced Tab on the popup that appears, scroll down and find product version and edition.

You can also see image below:

User generated image
User generated image
Avatar of Member_2_2131373

ASKER

Sorry, missed a critical bit of information!

I need to do this remotely and automatically, ideally with a bit of .NET code to trawl round the servers collecting the information.



Jim
I'm not sure but you might be able to use SMO to get this info.  It's part of the SQL Server feature pack that may or may not get installed on your machine when you install SQL Server.  Here's a link to download the various features.

http://www.microsoft.com/download/en/confirmation.aspx?id=16978

In the past, I used SQLDMO to retrieve the list of SQL Servers on my network, the databases, tables, and fields.  I'm just now changing that program over to use SMO.  I don't know if you can get the info you're wanting using it but it might be worth taking a look at.
>>Is it possible to retrieve the product string from an SQL server without logging in?<<
You cannot query the database without logging on, wether it is using SSMS, .NET, ASP or whatever.

But perhaps I misunderstood or you would like to restate your question.
ASKER CERTIFIED SOLUTION
Avatar of Armand G
Armand G
Flag of New Zealand image

Link to home
membership
Create an account to see this answer
Signing up is free. No credit card required.
Create Account
Many thanks armchang!

That almost gives me what I need, it's now just how to extract the edition/product name as the enumerator doesn't provide that.



Jim