Solved

Query for SQL machines with SQL Server instaled

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

Simplifying Server Workload Migrations

This use case outlines the migration challenges that organizations face and how the Acronis AnyData Engine supports physical-to-physical (P2P), physical-to-virtual (P2V), virtual to physical (V2P), and cross-virtual (V2V) migration scenarios to address these challenges.

Question has a verified solution.

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

Suggested Solutions

##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…
The question has been asked on multiple occasions as to how best to do printing in a remote desktop or terminal services environment.   It seems that this particular question has plagued several people and most especially as Terminal Services, as…
With Secure Portal Encryption, the recipient is sent a link to their email address directing them to the email laundry delivery page. From there, the recipient will be required to enter a user name and password to enter the page. Once the recipient …
Finds all prime numbers in a range requested and places them in a public primes() array. I've demostrated a template size of 30 (2 * 3 * 5) but larger templates can be built such 210  (2 * 3 * 5 * 7) or 2310  (2 * 3 * 5 * 7 * 11). The larger templa…

821 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