Solved

Query for SQL machines with SQL Server instaled

Posted on 2010-08-26
3
707 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

Best Practices: Disaster Recovery Testing

Besides backup, any IT division should have a disaster recovery plan. You will find a few tips below relating to the development of such a plan and to what issues one should pay special attention in the course of backup planning.

Question has a verified solution.

If you are experiencing a similar issue, please ask a related question

The environment that this is running in is SCCM 2007 R2 running on a Windows 2008 R2 server. The PXE Distribution point is running on its own Windows 2008 R2 box. This is what Event viewer showed after trying to start the WDS service:  An erro…
Remote Desktop Protocol or RDP has become an essential tool in many offices. This article will show you how to set up an external IP to point directly to an RDP session. There are many reasons why this is beneficial but perhaps the top reason is con…
Along with being a a promotional video for my three-day Annielytics Dashboard Seminor, this Micro Tutorial is an intro to Google Analytics API data.
With the power of JIRA, there's an unlimited number of ways you can customize it, use it and benefit from it. With that in mind, there's bound to be things that I wasn't able to cover in this course. With this summary we'll look at some places to go…

911 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

16 Experts available now in Live!

Get 1:1 Help Now