Skip to content

SQL Server Collection Query

Featured Replies

Does anyone have a clue on a query that would return machines with any Version of SQL Server installed?

 

I'm trying to create a collection of SQL machines.

 

Thanks!!

Something like this might do the trick:

 

select
SMS_R_System.ResourceId, SMS_R_System.ResourceType, SMS_R_System.Name, SMS_R_System.SMSUniqueIdentifier, SMS_R_System.ResourceDomainORWorkgroup, SMS_R_System.Client
from  
SMS_R_System inner join SMS_G_System_ADD_REMOVE_PROGRAMS_64 on SMS_G_System_ADD_REMOVE_PROGRAMS_64.ResourceID = SMS_R_System.ResourceId inner join SMS_G_System_ADD_REMOVE_PROGRAMS on SMS_G_System_ADD_REMOVE_PROGRAMS.ResourceId = SMS_R_System.ResourceId
where
SMS_G_System_ADD_REMOVE_PROGRAMS_64.DisplayName like "%SQL Server%"
or
SMS_G_System_ADD_REMOVE_PROGRAMS.DisplayName = "%SQL Server%"

  • 3 weeks later...
  • Author

Thanks, This works and now I have to tailor it down to version numbers to differentiate between 2005 and 2008. Would be alot easier if Microsoft just put that in Add/Remove programs or just made it part of the Product name instead of "Microsoft SQL Server"

  • 1 year later...
On 9/20/2012 at 4:32 PM, tmiller_hockey said:

Thanks, This works and now I have to tailor it down to version numbers to differentiate between 2005 and 2008. Would be alot easier if Microsoft just put that in Add/Remove programs or just made it part of the Product name instead of "Microsoft SQL Server"

 

Not sure if this is exactly what you are after, but would a variation of this help?

SQL Query for Specific Installs

Join the conversation

You can post now and register later. If you have an account, sign in now to post with your account.

Guest
Reply to this topic...

Account

Navigation

Search

Search

Configure browser push notifications

Chrome (Android)
  1. Tap the lock icon next to the address bar.
  2. Tap Permissions → Notifications.
  3. Adjust your preference.
Chrome (Desktop)
  1. Click the padlock icon in the address bar.
  2. Select Site settings.
  3. Find Notifications and adjust your preference.