Sccm 2012 update complaince query ---please help

hi
i have 2 primary sites and 1 secondary my sites computers name start with NDY ,MYS,KES   need and sql query run against an update group  . i would like take total sum of each site computers and run against update group to find % complaince
in each site .can any one help .after report is generated it should be in  below format
total no computers in site (for each site separte count ) ,
 count of  computers  NDY ,MYS ,KES   -->  % of update complaince -->  ,% non  complaince update
Please provide a sql query for this
ankith

I have below query from internet can any one help to modify this to create like the dashboard
Select Deploymentname, Available, Deadline,           
cast(((cast([Compliant] as float) / (ISNULL([Compliant], 0) + ISNULL([Enforcement state unknown], 0) + ISNULL([Successfully installed update(s)], 0) + ISNULL([Failed to install update(s)], 0) + ISNULL([Installing update(s)], 0) + ISNULL([Waiting for another
installation to complete], 0) + ISNULL([Pending system restart], 0) + ISNULL([Downloading update(s)], 0)))*100) as Numeric(10,2)) AS ‘% Compliant’,            
  [Compliant],            
  [Enforcement state unknown],            
  [Successfully installed update(s)],            
  [Failed to install update(s)],            
  [Installing update(s)],            
  [Waiting for another installation to complete],            
  [Pending system restart],            
  [Downloading update(s)]            
From            
(select            
a.AssignmentName as DeploymentName,            
a.StartTime as Available,            
a.EnforcementDeadline as Deadline,            
sn.StateName as LastEnforcementState,            
count(*) as NumberOfComputers            
from v_CIAssignment a            
join v_AssignmentState_Combined assc            
on a.AssignmentID=assc.AssignmentID            
join v_StateNames sn            
on assc.StateType = sn.TopicType and sn.StateID=isnull(assc.StateID,0)            
where AssignmentName NOT like ‘%_PREPROD_%’               
group by a.AssignmentName, a.StartTime, a.EnforcementDeadline,            
      sn.StateName) as PivotData            
PIVOT            
SUM (NumberOfComputers)            
FOR LastEnforcementState IN            
( [Compliant],            
  [Enforcement state unknown],            
  [Successfully installed update(s)],            
  [Failed to install update(s)],            
  [Installing update(s)],            
  [Waiting for another installation to complete],            
  [Pending system restart],            
  [Downloading update(s)])            
) AS pvt
ankith

Similar Messages

  • SCCM 2012 updates, refine query

    Hi,
    Please advise on refining Windows update search SCCM 2012.
    We want to have only security and critical updates, Office, Windows 2008 R2 and 2012, X64, Internet Explorer 10 only.
    Problem:
    -can't get only Internet explorer 10 to appear (tried it in several ways, now we work with custom severity set to none then selecting/setting internet explorer 11 etc to severity none) ONLY, please advise how you do that
    -x86 updates appear (ok for Office, but not for Windows) also IA64, we only need x64
    Jan Hoedt

    Thanks for your feedback.
    Why we worry about the query? Maybe I'm missing something here too. How else can you select  select specific updates in bulk? Otherwise we'd need to evaluate one by one.
    Goal is to select all the updates of a specific query and add them to an update group, not needing to worry a wrong update slipped in (f.e. deploying IE11 would mean a disaster)
    What we want to do = deploy security and critical updates, Office, Windows 2008 R2 and 2012, X64, Internet Explorer 10 only.
    If we would just select the updates and deploy:
    indeed the not applicable updates would not be deployed but still downloaded so wasting bandwith and storage (f.e. IA64)
    also previews, internet explorer 11, 12 etc would be deployed whereas we need to stick to internet explorer 10
    If I select "title not contains"  Internet explorer 11 or title not contains not IA64 it totally ignores it.
    J.
    Jan Hoedt

  • SCCM 2012 updates stuck on device

    Hi all,
    I have problem with SCCM 2012 updates on two machines. I have published security updates on all devices in collections without any problems. Till last week. On two devices, process of downloading has been stuck on 50%, 66% or 78%.
    Could I ask you how I should start troubleshooting this problem (I'm still "new" in SCCM topics).
    Thank you for any ideas and advices.
    Cheers!

    Pls check the logs
    http://technet.microsoft.com/en-us/library/hh427342.aspx#BKMK_SU_NAPLog
    Check these discussions
    http://social.technet.microsoft.com/Search/en-US/?query=stuck%20downloading&rq=meta:Search.MSForums.ForumID(7f829d1c-2fc5-4e76-aadc-a118080ff523)&rn=Configuration+Manager+Software+Updates+Management+Forum
    Thanks, Prabha G

  • My ipod touch is stuck on the 4.2.1 software, its a 3rd gen as well i was just wondering why i can not get the lastest update can you please help me with this issue

    i have been having an issue with updating my ipod touch for some time now and i can not seem to get it to update to the lastest update. it is stuck on 4.2.1 software and i can not update it to 4.3 or any other ios software update. can you please help me to solve this issue.

    It sounds like you actually have a 2G iPod Touch which can only go as high as iOS 4.2.1.  If it's an 8 GB iPod Touch it's definitely a 2G iPod Touch as there was never such a thing as a 3G 8 GB iPod Touch. See this article to help verify what generation iPod Touch you have.
    Identifying iPod models
    B-rock

  • Bluetooth shuttted down after I updated to Mavericks, please help me !  I am 70 Years old and worked very happy with my iMac (21,5" mid 2010, 3,2 GHz Intel Core 3) until I updated him from  SnowLeopard 10.6.8 to Mavericks 10.9.2. 2 Days all was OK. Next M

    Bluetooth shuttted down after I updated to Mavericks, please help me !
    I am 70 Years old and worked very happy with my iMac (21,5“ mid 2010, 3,2 GHz Intel Core 3)
    until I updated him from  SnowLeopard 10.6.8 to Mavericks 10.9.2.
    2 Days all was OK. Next Morning-Start he needs (until now) 3 minutes to show me a SCREEN only milky white. After that he starts like ever with all ICONS in about 1 minute. (together 4 min.)
    ..But I must notice, that I cannot make anything, because the „BLUETOOTH APPLE WIRELESS KEYBOARD  and the APPLE  MAGIC MOUSE“ doesn't work anything like before.
    I could nothing do, I must drop my APPLE only out.
    That I maked ever 10x and all was the same... (Maveriks also 4x new updated)
    I taked my Logitech-Bluetooth-Mouse from the WIN-Laptop, dropped it in USB from iMAC...and in one second I could work only with this MOUSE...I buyd the Logitech COMBO K520 and all was OK now with my lovely APPLE iMAC to work with him...But without APPLE KEYBOARD and MAGIC MOUSE...and with a 4 min. -START until now.
    I  asked the EXPERTS from APPLE-SUPPORT under Tel. 0800-6645451 in Germany, became a Number, maked many Things by starting new, but the mistake after all is the same like before.
    When I look into ...Apple/ Info/System/ Hardware/ Bluetooth   ..my APPLE says: NO INFOs FOUND (Es wurden keine Informationen gefunden.)
    Under Hardware/ Diagnose : Selbsttest beim Einschalten: zuletzt ausgeführt: 15.05. 14, Ergebnis: Bestanden (that means OK) !!
    I asked many Peaple, who sold APPLE-Computers in the STORS, but they all had no IDEA, how they can help.
    I think, it could be a DRIVER when Starting the BIOS, JAVA RUNTIME a.s.o...
    Is an Expert under YOU to help me by my Problem with this iMAC ?

    dietmarfromdeu,
    if you start up your iMac in Safe mode, do you still have Bluetooth problems with your Apple wireless keyboard and Magic Mouse?

  • HT4623 hi..i just bought an iphone 5 yesterday 32GB..and now when i am trying to update the software..it says the following: unable to check for update/an error occurred while cheking for a software update...please help me..is it a problem in my new iphon

    hi..i just bought an iphone 5 yesterday 32GB..and now when i am trying to update the software..it says the following: unable to check for update/an error occurred while cheking for a software update...please help me..is it a problem in my new iphone??or it's just an temporary error in the apple software center???

    Lyndsay237 wrote:
    This device does not have a sim card in it. Could this be the reason or am I missing something when I am trying to update.
    Yes. You can't update or restore any GSM iPhone without a valid sim card installed in the phone. The sim card need not be activated, but it must be valid & present. If you want to update, you need to get a sim card.

  • My iphoto wont open since i updated my mac, please help? it says i need to install an iphoto library upgrader which I have installed but still cant see my photos.

    my iphoto wont open since i updated my mac, please help? it says i need to install an iphoto library upgrader which I have installed but still cant see my photos.

    What version of iPhoto are you using? 9.6 is the current version.
    Do a backup.
    Quit the application.
    Go to Finder and select your user/home folder. With that Finder window as the front window, either select Finder/View/Show View options or go command - J.  When the View options opens, check ’Show Library Folder’. That should make your user library folder visible in your user/home folder.  Select Library. Then go to Preferences/com.apple.iPhoto.plist. Move the .plist to your desktop.
    Restart, open the application and test. If it works okay, delete the plist from the desktop.
    If the application is the same, return the .plist to where you got it from, overwriting the newer one.
    Thanks to leonie for some information contained in this.

  • I updated the spelling of a song in my itunes but its not reflecting when i check my ipod. this never happened before when after i updated to IOS5. please help.

    i updated the spelling of a song in my itunes but its not reflecting when i check my ipod. this never happened before when after i updated to IOS5. please help.

    Try unsyncing the sone and then resyncing. That works sometimes. Sometimes restoring from backup works. Other times nothing seems to work.. Yuo are not alone since iOS5 and iTunes 10.5/6.

  • How to improve the performance of the attached query, Please help

    Hi,
    How to improve performance of the below query, Please help. also attached explain plan -
    SELECT Camp.Id,
    rCam.AccountKey,
    Camp.Id,
    CamBilling.Cpm,
    CamBilling.Cpc,
    CamBilling.FlatRate,
    Camp.CampaignKey,
    Camp.AccountKey,
    CamBilling.billoncontractedamount,
    (SUM(rCam.Impressions) * 0.001 + SUM(rCam.Clickthrus)) AS GR,
    rCam.AccountKey as AccountKey
    FROM Campaign Camp, rCamSit rCam, CamBilling, Site xSite
    WHERE Camp.AccountKey = rCam.AccountKey
    AND Camp.AvCampaignKey = rCam.AvCampaignKey
    AND Camp.AccountKey = CamBilling.AccountKey
    AND Camp.CampaignKey = CamBilling.CampaignKey
    AND rCam.AccountKey = xSite.AccountKey
    AND rCam.AvSiteKey = xSite.AvSiteKey
    AND rCam.RmWhen BETWEEN to_date('01-01-2009', 'DD-MM-YYYY') and
    to_date('01-01-2011', 'DD-MM-YYYY')
    GROUP By rCam.AccountKey,
    Camp.Id,
    CamBilling.Cpm,
    CamBilling.Cpc,
    CamBilling.FlatRate,
    Camp.CampaignKey,
    Camp.AccountKey,
    CamBilling.billoncontractedamount
    Explain Plan :-
    Description                    Object_owner          Object_name     Cost     Cardinality     Bytes     
    SELECT STATEMENT, GOAL = ALL_ROWS                              14     1     13
    SORT AGGREGATE                                                  1     13
    VIEW                         GEMINI_REPORTING               14     1     13
    HASH GROUP BY                                        14     1     103
    NESTED LOOPS                                        13     1     103
    HASH JOIN                                             12     1     85
    TABLE ACCESS BY INDEX ROWID     GEMINI_REPORTING     RCAMSIT          2     4     100
    NESTED LOOPS                                        9     5     325
    HASH JOIN                                        7     1     40
    SORT UNIQUE                                        2     1     18
    TABLE ACCESS BY INDEX ROWID     GEMINI_PRIMARY          SITE          2     1     18
    INDEX RANGE SCAN          GEMINI_PRIMARY          SITE_I0          1     1     
    TABLE ACCESS FULL          GEMINI_PRIMARY          SITE          3     27     594
    INDEX RANGE SCAN          GEMINI_REPORTING     RCAMSIT_I     1     1     5     
    TABLE ACCESS FULL     GEMINI_PRIMARY     CAMPAIGN                    3     127     2540
    TABLE ACCESS BY INDEX ROWID     GEMINI_PRIMARY          CAMBILLING     1     1     18
    INDEX UNIQUE SCAN     GEMINI_PRIMARY     CAMBILLING_U1                    0     1

    Hello,
    This has really nothing to do with the Oracle Forms product.
    Please, send the SQL or/and PL/SQL questions in the corresponding forums.
    Francois

  • I am still trying to update my ipod touch 4 to the iOS 6 version. It is on the 4.3.5 (8L1) version. When I go to settings-General-it just says About and nothing about an update. I have no idea how to update it! Please help!

    I am still trying to update my Ipod touch 4 to the iOS 6 version. It is on the 4.3.5 (8L1) version. When I go to settings-General-it just says About and nothing about an update. I have no idea how to update it! Please help!

    You can only update via the ipod with ios 5 or later.
    You need to update via itunes on your computer as always.

  • SCCM 2012 Update Group inconsistency Problem with Red marked Updates

    Hi everybody,
    we have a big Problem with our SCCM 2012 R2 CU3 Enviroment, regarding of Update Groups which got out of sync.
    we have a SCCM Site Infastructure with one CAS and 4 Primary Sites and on every Site is the SUP Role installed.
    I don't know when this failure occours but i think it was after the CU3 Installation. The Installation itself went smooth without any Errors or Warnings.
    The Problem is as following. We have some updates in Update Groups (all of them are Core XML Updates) which are out of sync and marked red as an invalid Update on 2 Primary Sites. On the CAS Site and the 2 other Primary SItes they are marked as green (downloaded
    yes and deployed yes)
    We have no Replication issues regarding the Replication Status (everything is synchronized to 100%) and the Replication Link Analyzer does also show no Problems at all.
    I now deleted the Deployments and the SW Update Group waited until the replication was fine and created a new one and downloaded these patches on one of the Primary Sites which had shown this Failure.
    The Result was not good. It looks like before. On the CAS and 2 Primary Sites the Deplyment is shown as downloaded but on the other 2 Sites the Status is again Downloaded=no.
    Does anybody have any idea what to do now ? I checked objmgr.log and rcmctr. log but found nothing what shows me the way in the right direction.
    Thx for your time, and it would be fine if anybody can share knowledge about this failure and how to fix it.
    All other Ideas are also welcome.
    Thx a lot in advance and have a nice bug free day :-)
    Bastian

    Hi,
    Please try to manually synchronize software updates from the CAS and monitor the WSUSCtrl.log, WCM.log and wsyncmgr.log on the CAS and Primary sites.
    Best Regards,
    Joyce
    We
    are trying to better understand customer views on social support experience, so your participation in this
    interview project would be greatly appreciated if you have time.
    Thanks for helping make community forums a great place.

  • SCCM 2012: update client machine policy via powershell?

    Hi,
    Does SCCM 2012 R2 have powershell command built-in to trigger update actions of SCCM client (update machine policy etc)?
    J.
    Jan Hoedt

    To update client machine using Power Shell, you can check below link
    http://blogg.alltomdeployment.se/2014/02/howto-force-remote-clients-to-update-their-sccm-clients-machine-policy-retrieval-evaluation-cycle-via-powershell/
    Please remember, if you see a post that helped you please click "Vote As Helpful" and if it answered your question, please click "Mark As Answer"
    Mai Ali | My blog: Technical | Twitter:
    Mai Ali

  • SCCM 2012 R2 Empty Query in Collection

    Now, I just discovered yesterday where I created Collection with query but resulted NONE. I know there's no problem with the query itself because I created the same one within the query itself and it give me the result.
    Here's another problem with my CAS & Primary Site SCCM 2012 R2 with CU1:
    1. Created X64 (Servers & Workstations) Collection with membership rules:
    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_COMPUTER_SYSTEM on SMS_G_System_COMPUTER_SYSTEM.ResourceID
    = SMS_R_System.ResourceId where SMS_G_System_COMPUTER_SYSTEM.SystemType = "x64-based PC"
    It doesn't give me anything (blank no computer names) even after I refresh the collection.
    BUT, when I created under \Monitoring\Overview\Queries\Results for X64 (Servers & Workstations)
    I could see the result of it.
    Is it my SQL has problem? I'm using SQL 2012 SP1.
    I even updated with CU2 now in Production but it still the same thing. I have no problem with this query above in my test environment.
    Have you come across with this issue? Thanks, Reza
    Reza Prawirasatya

    You might have used a empty limiting collection

  • Unable to Load Mac OSX after update - Urgent! Please Help

    I just updated my Mac using System update, which required a start.
    I restarted the computer, but it's stuck in the gray apple screen with the circular running bars. It's been now 10 minutes, and it never took so much. I tried to turn it off, then on again, same problem. What should I do? Please, help!
    Thanks,
    richard

    Problem solved.
    First of all, thank you all for the advices and links, now I learned something. After panicking, I tried the PRAM reset restart and the "shift" restart and it didn't work. I didn't have the installation disk with me, so I went straight to Tekserve to hear them. They told me that my system got corrupted for some reason and I had two options with them:
    - a quick fix, for US$59, which would erase all my HD content and take 24 hours
    - a fix without erasing the HD, for US$195, which would take 4 business days!
    They said those were all the options. For me the money was not major problem. The big issue for me would be not having my computer for many days.
    Then I thought: what if I try to reinstall the system myself? And they said: well, you can try that.
    That's what I did as I got home. Install disk, restart holding down the "C" key.
    One hour later, everything was back to normal.
    Now the question: why at tekserve they didn't say anything to me about reinstalling the system myself?
    Anyway, this was the first major problem I bumped into since I have turned to apple 3 years ago.
    And again, thanks everybody for the help!

  • TS1538 i have an ipod classic that is no longer able to sync since I updated itunes. Please help

    I love my ipod but when I updated itunes the device no longer is recognised and thus I am unable to sync.  I missed supplying music for New Years Eve and still can't figure it out .  Please help me!!!

    You will need to add a data plan to use it.

Maybe you are looking for

  • The best/clean/free approach to moving SharePoint Web Application between environments?

    Hello Forum, I have an environment e.g. (Environment1) Web Application that contains 90 site collections (Including: Lists, Libraries, Workflows, and custom solutions), and its URL is (http://Dept.Company.com/) I must move this entire Web Application

  • Hardware timed Dataacquisition with cRIO

    hi, i am trying to develop a code for dataacquisition using cRIO. my application specifications are: Digital Input: 1 (trigger for acquisition, i have a cRIO-9401 DIO module Analog Inputs-2 (i have cRIO-9215 and also cRIO-9221 AI modules for this) i

  • Missing Type Definitions on the SAmple Schema Script

    Hi Gurus, The following is the script taken from Oracle 9i Sample schemas page. Here the scripts for some types ORDSYS.ORDImage, ORDSYS.ORDImageSignature,ORDSYS.ORDVideo,ORDSYS.ORDAudio,ORDSYS.ORDDoc are not given. Can you help me in getting those. C

  • Soundpaper App v1.3.1 - All files disappeared

    I was using soundpaper to record lectures at school. It allows you to record the audio and type your notes. Today I went to class and all my files have disappeared. I had just purchased a my iPad 3G a couple of weeks ago. Bummed.

  • SunOne ejb deployment error

    Hi, I'm trying to deploy an ejb on SunOne AppSvr7 (Solaris8). However, I always get the following error: Cannot deploy the component error received from mbean null The following message is found on the admin-server log: [01/Apr/2003:17:54:51] INFO (