Solved

Query for SQL machines with SQL Server instaled

Posted on 2010-08-26
3
706 Views
Last Modified: 2013-11-21
I need a query to tell me that SCCM versions and the number of installations of SQL Server is on the site
0
Comment
Question by:ggarate
  • 2
3 Comments
 
LVL 31

Expert Comment

by:merowinger
ID: 33541745
not the whole solution as i don't have the time for it, but a step in the correct direction
SELECT distinct dbo.v_R_System.Netbios_Name0,dbo.v_Add_Remove_Programs.DisplayName0

FROM dbo.v_Add_Remove_Programs INNER JOIN dbo.v_R_System ON dbo.v_Add_Remove_Programs.ResourceID = dbo.v_R_System.ResourceID

WHERE dbo.v_Add_Remove_Programs.ProdID0 not like '{%' and

dbo.v_Add_Remove_Programs.displayname0  like 'Microsoft SQL Server 2005'

or dbo.v_Add_Remove_Programs.displayname0  like 'Microsoft SQL Server 2005 (64-Bit)'

or dbo.v_Add_Remove_Programs.displayname0  like 'Microsoft SQL Server 2008 (64-bit)'

Open in new window

0
 
LVL 6

Expert Comment

by:TarekIsmail
ID: 33562608
HI ,
you make query based on the service name as

select distinct SMS_R_System.NetbiosName, SMS_R_System.ClientVersion, SMS_R_System.IPAddresses, OSname.Caption from  SMS_R_System inner join SMS_G_System_SERVICE on SMS_G_System_SERVICE.ResourceID = SMS_R_System.ResourceId inner join SMS_G_System_OPERATING_SYSTEM on SMS_G_System_OPERATING_SYSTEM.ResourceID = SMS_R_System.ResourceId inner join SMS_G_System_OPERATING_SYSTEM as OSname on OSname.ResourceID = SMS_R_System.ResourceId where SMS_G_System_SERVICE.DisplayName = "SQL Server (MSSQLSERVER)"

Open in new window

0
 
LVL 6

Accepted Solution

by:
TarekIsmail earned 500 total points
ID: 33562611
select distinct SMS_R_System.NetbiosName, SMS_R_System.ClientVersion, SMS_R_System.IPAddresses, OSname.Caption from  SMS_R_System inner join SMS_G_System_SERVICE on SMS_G_System_SERVICE.ResourceID = SMS_R_System.ResourceId inner join SMS_G_System_OPERATING_SYSTEM on SMS_G_System_OPERATING_SYSTEM.ResourceID = SMS_R_System.ResourceId inner join SMS_G_System_OPERATING_SYSTEM as OSname on OSname.ResourceID = SMS_R_System.ResourceId where SMS_G_System_SERVICE.DisplayName = "SQL Server (MSSQLSERVER)"
0

Featured Post

The problems with reply email signatures

Do you wish that you could place an email signature under a reply? Well, unfortunately, you can't. That great Exchange/Office 365 signature you've created will just appear at the bottom of an email chain. What a pain! Is there really no way to solve this? Well, there might be...

Join & Write a Comment

##the calculator has been updated to version 1.6 please download the use the updated version## Hi there, After the previous post of the original version of the calculator here : http://www.experts-exchange.com/articles/OS/Microsoft_Operatin…
Welcome to my series of short tips on migrations. Whilst based on Microsoft migrations the same principles can be applied to any type of migration. My first tip Migration Tip #1 – Source Server Health can be found here: http://www.experts-exchang…
In this tutorial you'll learn about bandwidth monitoring with flows and packet sniffing with our network monitoring solution PRTG Network Monitor (https://www.paessler.com/prtg). If you're interested in additional methods for monitoring bandwidt…
Polish reports in Access so they look terrific. Take yourself to another level. Equations, Back Color, Alternate Back Color. Write easy VBA Code. Tighten space to use less pages. Launch report from a menu, considering criteria only when it is filled…

708 members asked questions and received personalized solutions in the past 7 days.

Join the community of 500,000 technology professionals and ask your questions.

Join & Ask a Question

Need Help in Real-Time?

Connect with top rated Experts

18 Experts available now in Live!

Get 1:1 Help Now