SCSM 2012 - Reporting on Service Level Breached Incidents in SQL Report Builder

Is anyone clever enough to provide the SQL code required for me to run a report showing the id, title, target end date, and support group for any active incident that has breached its SLA?
I want to run this report automatically each morning and email it but just can't work out the SQL code

This is an example of a SLO report that I came up with.  I am sure you can adapt it for your use.  It get SLO information on Service Requests.  It's a daily report that brings back both worker and support group information.
BEGIN
DECLARE @Now AS SMALLDATETIME;
DECLARE @TBL_ServiceRequests AS TABLE (
SLOtarget SMALLDATETIME,
SLOwarning SMALLDATETIME,
AssignedTo NVARCHAR(50),
SupportGroup NVARCHAR(50));
BEGIN
INSERT INTO @TBL_ServiceRequests
SELECT
SLO.TargetEndDate_4F17E5C2_86D5_05E8_35DE_6E012567DAB7,
SLO.TargetWarningDate_B98D2C5F_CBA2_8DB9_CA33_E0F808A9801E,
UD.DisplayName,
SR_Group.ServiceRequestSupportGroupValue
FROM DBO.ServiceRequestDim AS SR
INNER JOIN DBO.ServiceRequestSupportGroup AS SR_Group
ON SR.SupportGroup_ServiceRequestSupportGroupId = SR_Group.ServiceRequestSupportGroupId
LEFT OUTER JOIN {'CMDB'}.ServiceManager.dbo.MT_System$WorkItem$ServiceRequest AS PrimarySR
ON SR.BaseManagedEntityId = PrimarySR.BaseManagedEntityID
LEFT OUTER JOIN {'CMDB'}.ServiceManager.dbo.Relationship as Relationship
ON PrimarySR.BaseManagedEntityID = Relationship.SourceEntityID
LEFT OUTER JOIN {'CMDB'}.ServiceManager.dbo.RelationshipType as RelationshipType
ON Relationship.RelationshipTypeID = RelationshipType.RelationshipTypeID
LEFT OUTER JOIN {'CMDB'}.ServiceManager.dbo.MT_System$SLA$Instance$TimeInformation as SLO
ON SLO.BaseManagedEntityID = Relationship.TargetEntityID
LEFT OUTER JOIN DBO.WorkItemDim AS WR
ON SR.BaseManagedEntityId = WR.BaseManagedEntityId
LEFT OUTER JOIN DBO.WorkItemAssignedToUserFactvw AS ASTO
ON WR.WorkItemDimKey = ASTO.WorkItemDimKey
LEFT OUTER JOIN DBO.UserDim AS UD
ON ASTO.WorkItemAssignedToUser_UserDimKey = UD.UserDimKey
WHERE
SR.SupportGroup_ServiceRequestSupportGroupId IN ({'Your Support Group Ids'})
AND
SR.Status_ServiceRequestStatusId IN (7,8,9)
AND
SR.IsDeleted = 0
AND
RelationshipType.RelationshipTypeName = 'System.WorkItemHasSLAInstanceInformation' ;
END
BEGIN
SELECT @Now = CAST(CURRENT_TIMESTAMP AS SMALLDATETIME);
SELECT
[@TBL_ServiceRequests].AssignedTo as [Assigned To],
COUNT(*) AS [Open],
SUM(
CASE
WHEN [@TBL_ServiceRequests].[SLOtarget] > @Now THEN 1 ELSE 0
END
) AS [On Time],
SUM(
CASE
WHEN @Now BETWEEN [@TBL_ServiceRequests].[SLOwarning] AND [@TBL_ServiceRequests].[SLOtarget] THEN 1 ELSE 0
END
) AS [Near Overdue],
SUM(
CASE
WHEN [@TBL_ServiceRequests].[SLOtarget] < @Now THEN 1 ELSE 0
END
) AS [Overdue]
FROM @TBL_ServiceRequests
WHERE [@TBL_ServiceRequests].[AssignedTo] IS NOT NULL
GROUP BY [AssignedTo]
UNION ALL
SELECT
[@TBL_ServiceRequests].[SupportGroup] + ' Assigned',
COUNT(*),
SUM(
CASE
WHEN [@TBL_ServiceRequests].[SLOtarget] > @Now THEN 1 ELSE 0
END
) AS [On Time],
SUM(
CASE
WHEN @Now BETWEEN [@TBL_ServiceRequests].[SLOwarning] AND [@TBL_ServiceRequests].[SLOtarget] THEN 1 ELSE 0
END
) AS [Near Overdue],
SUM(
CASE
WHEN [@TBL_ServiceRequests].[SLOtarget] < @Now THEN 1 ELSE 0
END
) AS [Overdue]
FROM @TBL_ServiceRequests
WHERE [@TBL_ServiceRequests].[AssignedTo] IS NOT NULL
GROUP BY [@TBL_ServiceRequests].SupportGroup
UNION ALL
SELECT
[@TBL_ServiceRequests].[SupportGroup] + ' Unassigned',
COUNT(*),
SUM(
CASE
WHEN [@TBL_ServiceRequests].[SLOtarget] > @Now THEN 1 ELSE 0
END
) AS [On Time],
SUM(
CASE
WHEN @Now BETWEEN [@TBL_ServiceRequests].[SLOwarning] AND [@TBL_ServiceRequests].[SLOtarget] THEN 1 ELSE 0
END
) AS [Near Overdue],
SUM(
CASE
WHEN [@TBL_ServiceRequests].[SLOtarget] < @Now THEN 1 ELSE 0
END
) AS [Overdue]
FROM @TBL_ServiceRequests
WHERE [@TBL_ServiceRequests].[AssignedTo] IS NULL
GROUP BY [@TBL_ServiceRequests].SupportGroup
END
END

Similar Messages

  • Is there any report for service level agreement monitoring?

    Regards,
    Lament

    Hello
    To configure the SLR Report, goto transaction DSMOP or DSWP
    in soution overview, choose your system (i'm suposing you already configured monitoring for your system)
    goto tab Solution Monitoring, choose operations setup on the left, and Service level reporting on the right.
    there you can activate service level reporting, and customize your report.
    If you need more help, let me know.
    Regards
    Geert

  • Print Report & Download CSV link missing in Custom SQL Report template

    Hi All,
    In Apex 3.1, I've been using the default templates till some color change issues forced me to create a custom one.
    The problem is my Download CSV and Print (excel,pdf) are gone in the new report. How would I reference them in report template to get those links back? (using # presuming)
    many thanks.
    APEX 3.1
    Edited by: AI on 15/04/2012 22:58

    SOLVED.
    The # thing is called substitution string. To make them show in your custom report use #CSV_LINK# In your Report Template.
    To shove it right, encapsulate it in DIV. <di v align=right>#CSV_LINK#</D IV>
    Edited by: AI on 15/04/2012 23:22

  • SCSM 2012 - all business services reporting - which cube can I report from

    I want to report on all business services, does anyone know which cube i can report on business services from? any other advise relating to this appreciated.

    Hello,
    Same question here, have you find a response to your question ?
    I'm very interested...
    Regards.

  • SCSM 2012 R2 Self Service Portal is supported on Microsoft Sharepoint Foundation 2013 Sp1 or not

    Hello,
    I have a requirement to install Self Service Portal on one dedicated Server and found that Both the Web Content Server and SharePoint Web Parts can be installed on single Server. I want to use Microsoft Sharepoint 2010 Foundation Server as
    it is free but it is not supported on Windows Server 2012 R2.
    My query are -
    Can we use Microsoft SharePoint Foundation 2013 Sp1 for the same purpose.
    Can we install Both the Web Content Server and SharePoint Web Parts on One Computer for Self Service portal
    I was referring the below link which says that Sharepoint 2013 is not supported, does it mean for Sharepoint foundation 2013 Sp1 is also not supported.
    http://www.microsoft.com/en-in/download/details.aspx?id=24983 
    Please help.
    Thanks,
    Ankur

    for background, there are actually three parts here. there is a SharePoint team site, there is the content distribution website, and there is the data access website. the data access and the content website are almost always collocated on the same servers,
    since they are both IIS virtual directories. the sharepoint team site is packaged for 2010, but it's been
    successfully installed on 2013 without problems. 
    you have a couple of options:
    you can put all three web componets on the same server by using foundation 2010
    you can put all three on the same 2013 server using the method above
    you can put the two iisvds on a server and install the team site using the method above
    you can install the content and data access services on a separate server, and then install a scrap foundation SharePoint and export out the team site and import it into your existing SharePoint site

  • SCSM 2012 - Business services reporting

    When reporting on business services I go to the ConfigItem Cube
    When I look at the ServiceDim there is an option for 'Business Detailed Descripion'. This is always blank when I report on it.
    When I set up business services in SCSM 2012 I do not see a field called 'Business Detailed Descripion' - where should i enter this information in SCSM 2012 so that I can add it to my report?
    tamrep

    Hi Tamrep,
    If you open Business service in the Authoring Tool and you explore in the class properties, you will see the "Business Detailed Description" field.
    But this is not by default available in your form. If you want, you can add this field with the Authoring tool to the business service form and make it available.
    Regards,
    Dennis

  • Service Level Report values not matching to Service Level Dashboard v 2.0 values

    Hi Experts,
    We have installed SLD v2 on a development SQL server along with WSS 3.0. The SLD is pointed to the SCOM datawarehouseDB to collect the information to have it up in the dials.
    We have SCOM 2007 R2 who's OpsMgrDB and OpsMgrDWDB are hosted on a SQL 2008 R2 instance.
    I have created the Distributed application and added 3 Service level Tracking to it. 
    Availibility
    Processor Utilization
    Memory Utilization
    The problem here i am facing is that the values in the dials on the SLD Home sites do not match with the values i get when i run the report for  Service Level Tracking Summary under reporting tab in Ops
    Console.
    What could be probable reason for this ?
    Regards,
    Prajul

    Hello,
    Here are some articles related to this issue. Hope they are helpful.
    Running a Service Level Tracking Report
    http://technet.microsoft.com/en-us/library/hh212726.aspx
    Generating a Service Level Tracking Report
    http://technet.microsoft.com/en-us/library/dd441422.aspx
    The Service Level Tracking Summary Report in System Center Operations Manager 2007 may be empty if TODAY is not selected for the TO date
    http://support.microsoft.com/kb/2567404/en-us
    Best regards,
    Sophia Sun
    Please remember to click “Mark as Answer” on the post that helps you, and to click “Unmark as Answer” if a marked post does not actually answer your question. This can be beneficial to other community members reading the thread.

  • SQL Reporting Services 2014, Enabling Kerberos causes report manager to be extremely slow

    We are migrating our environment from SQL Reporting Services 2008 to 2014 on a new server. We are currently using kerberos on the 2008 instance, but when I enable kerberos on the 2014 Reporting Services instance the Report Manager becomes extremely slow.
    Has anyone seen this before? Any ideas of what I can check to see what is causing this problem.

    Just to clarify it is not slow when I run a report, it is slow in general. From first load to accessing a folder, settings, etc. This is all before even executing a report. 
    The error I see while using Wireshark is KRB Error: KRB5KDC_ERR_BADOPTION NT Status: STATUS_NO_MATCH. When I drill down the into the
    error I can see the kerberos string is testprjmnmtreports14.company.com, which is the URL we are using to access the site. I made sure to add that name as an SPN for the service account that is running SQL Reporting Services, however I still receive the error.
    Then I tried configuring the site to run without a hostheader, so I accessed the site with the server name ECTSTSQLRS5 and the site works perfectly fine, no errors are reported either. So it seems I have isolated the issue down to Kerberos but I am not sure
    how to resolve it. Here is some more information about my environment:
    DNS/URL used: testprjmnmtreports14.company.com
    Server Name (FQDN): ECTSTSQLRS5.company.int
    AD Domain Name: company.int
    Server Version: Windows Server 2012 R2
    AD Functional Level: 2008 R2
    I also have the following SPNs set for my SQL service account:
    http/testprjmngmtreports14.company.com
    http/testprjmngmtreports14
    http/ECTSTSQLRS5.COMPANY.INT
    http/ECTSTSQLRS5
    As you can see I am trying to use a .com address but my AD domain is .int which I think is the issue, but I do not have the same problem on my other server that is running Windows Server 2008 R2. 

  • SCSM 2012 SLA warning notification not sending emails

    1. for priority 1 incidents, the warning threshold is 5 mins and the
    target resolution is 10 mins 
    2. the issue is on the Warning Notification subscription. the setting is--> when to notify: --> (when an object of the selected class has been updated: from
    Status does not equal to: warning to
    Status equals to: warning ) as in this example.
    http://amphibiology.rssing.com/chan-2091295/all_p14.html. under its History,its enabled and there are no failed workflows.
    3. i have done the subscription for breaching and it's sending emails only when using one of these first 2 settings --->(1. when to notify:
    when an object has been created , Status equals to: breached) and 2. from not equal to: breached  to equals to: breached,
    but not for this one-->3. (when an object has been updated: from equals to:
    warning to equals to: breached, which, in other words means that the
    Warning Status is not triggering the email event. Also, under
    Work Items, Incidents with Service Level Warning, there is nothing too. but under Incidents with Service Level Breached, there are some incidents. how can i make this SLA
    warning Status work?????

    You should be also aware of this: SLO Warning in wrong time (especially when working
    with longer time spans):
        TargetWarningTime = (StartDate(businessTime) + Target(businessTime)) - Warning(time)
    This can be a bit confusing and in certain cases non-functional. E. g.
    Target: 8H, Warning: 4H, WD: 08:00 - 16:00
        StartDate: 1970-1-1 08:01
        Target Time: 1970-1-2 08:01
        TargetWarningTime: 1970-1-2
    04:01
    You can check calculated warning time in DB, see post.
    Best regards,
        Blaz

  • EIM 4.3 - Service Levels

    Hello,
    I have been looking at setting service levels within an integrated EIM environment, and I can't seem to make the correlation between configuring them in my workflow and reporting.
    In my workflow, I setup two SL's.
       1 - Total Case Activity Time - 8 hours
       2 - Total Activity Time - 2 hours
    I can see how to setup alarms to notify my supervisors if I am going to exceed my SL set above.
    For reporting... I don't see where these service levels are tied into my reports. It looks to me like I need to set a service level manually for each report I would like to do.
    I figured Service Levels were kind of like call types, in that I would run a service level report and it would return data based on emails hitting that service level, etc.
    If someone has created reports based on the service levels they entered in their workflow, can you let me know what you chose?
    Thanks!
    Barry

    Hi Matthew,
    Unfortunately the service levels you enter are just for monitoring and notifying. The actual reports you run, you need to specify the service levels in there manually.
    Other than that, I have found no other work around, or had the opportunity to engage eGain directly to try to talk about this.
    Thanks!
    Barry

  • Service levels in UCCX- include IVR time?

    I`ve been asked a question regarding Service Levels. Within UCCX the levels are set so if the service level is 10 and the % is set to 25% then we expect 25% of  calls to be answered within 10secs however if you have IVR, option 1, press 2 etc should you not take into account any IVR. When I worked on Nortel Symposium you created sub scripts so when running Service Levels the actual script you report on was only used to offer the call to the Skill Set and was not configured with any  IVR options so it was the service level- what are the options in UCCX do we add the IVR prompt so if the prompt is 10 sec long we would in the above situation make the Service Level 20 sec to give a true picture?
    thanks

    You should create a proof script, and tell us what you found out.
    Here's an example:
    startacceptdelay(15000)select resource     connected          end     queued          delay(30000)terminateend
    Set your SLA to 10 seconds and 100%, then call this script with a ready agent.  Now run a report and see if you made the SLA.  If you made the SLA, that means you handled the call within 10 seconds, which also means, the time before the "select resource" step is not a part of the SLA.
    Take it one step further:  is the time the call is ringing on the Agent's phone a part of the SLA?  i.e., RNA timer is 10 sec. and SLA is 5 sec.

  • Add SQL reporting services to get Azure sql db data

    Dear all,
    I have read recently that SQL server reporting services as been remmoved from Azure services. I have a SQL server database on azure which collect different type of data which are collected from a web admin portal by my users.
    I have a strong need to bring to that admin web portal a flexible reporting solution for my users to monitor collected data.
    Of course I can bring dash board to web application but often it is painful to change web app when a user want different type of report.
    What could be the way now to use online reporting service in orde to bring online report for my user of my sql azure database ?
    regards
    serge

    Hi serge,
    Based on my understanding, you want to use SQL Azure database to design the report, right?
    As you mentioned,
    Azure SQL Reporting is officially discontinued, so that we can’t design reports with Azure SQL Reporting. However, only the Azure cloud implementation of SQL Reporting is discontinued. All other forms of Reporting Services technology are unaffected. In
    Reporting services, it’s supported connect to SQL Azure database. So in your scenario, you can connect to the SQL Azure database to design the report. For more information, please refer to this article:
    How to connect to SQL Azure using SQL Server Reporting Services 2008 R2.
    If you have any question, please feel free to ask.
    Best regards,
    Qiuyun Yu
    Qiuyun Yu
    TechNet Community Support

  • Refresh SQL Report Apex 4

    Hello everyone,
    On one of my pages i have 2 reports. An interactive Report and a SQL Report.(APEX 4.0)
    I don't know why Apex doesn't support 2 Interactive Reports on the same page.
    I need to refresh this reports on certain moments.Using a Dynamic Action i managed to refresh the Interactive Report, but not the SQL Report.
    I notice that in the SQL Report i have no "Enable Partial Page Refresh" checkbox...Is there any way to refresh a SQL Report via Dynamic Actions ?
    Thank you!
    Kind Regards,
    Cearnau Dan

    Hi Cearnau,
    Try this:
    Report Footer:
    &lt;script type="text/javascript">
        // Set report id
        $s('P1_REPORT_ID','#REGION_STATIC_ID#'.substr(1));
        // old version
        // $x('P1_REPORT_ID').value = '#REGION_STATIC_ID#'.substr(1);
    &lt;/script>
    HTML Header:
    &lt;script type="text/javascript">
    function fnc_updateReport(){
        // Report refresh
       $a_report($x('P1_REPORT_ID').value,'1','10','100');
    &lt;/script>Of course updating the Report with a dynamic action would work as well! :)
    Edited by: Tobias Arnhold on Oct 18, 2010 4:47 PM

  • Scsm 2012 - SQL reporting from business services

    when i process a report in SQL Reporting Services for Business Services - and many other configuration items - I put a column in the report for priority and when I output the report it appears as a number which is wrong.
    For example, I have in the pruiority field for business services a drop down of High, Medium and Low - when I output the report this value appears as a number rather than the work High, Madium or Low.
    Does anyone know why this is and how it can be fixed?
    tamrep

    It sounds like your Report showing the Priority ID rather than the Priority value.
    You need to add a JOIN Statement in your SQL query to join on the Priority ID from the ServiceDimvw to the Priority ID from the ServicePriorityvw.
    Something like this:
    SELECT DisplayName,
    Priority.ServicePriorityValue
    FROM ServiceDimvw
    LEFT OUTER JOIN ServicePriorityvw as Priority on ServiceDimvw.Priority_ServicePriorityId = Priority.ServicePriorityId
    Cheers
    Alex

  • SCSM 2012 Relationship between Incident and Service Level Instance Time Information

    Hi,
    I am using a runbook similar to
    this one, but am getting many different Incident relationships.
    For testing, I want to initiate the runbook not with a Monitor Object looking at the Service Level Instance Time Information class, but manually with an Initialize Data action.
    Can someone advise how to do this? What 'GUID' does the Monitor Object look at and pass on to the runbook?
    Or perhaps a powershell snippet that shows how the relationship works...
    Thanks,
    Joe.

    Try this:
    SELECT dbo.MTV_System$SLA$Instance$TimeInformation.BaseManagedEntityId, dbo.MTV_System$SLA$Instance$TimeInformation.DisplayName,
    dbo.MTV_System$SLA$Instance$TimeInformation.StartDate_6F33A83B_41D9_A782_379E_A75CA15145F3,
    dbo.MTV_System$SLA$Instance$TimeInformation.Id_1C7A525A_E7EC_59B9_6FF3_CFCECA1A64A0,
    dbo.MTV_System$SLA$Instance$TimeInformation.IsCancelled_16DDBB6C_0E00_ACAD_4F04_D134E61AF82B,
    dbo.MTV_System$SLA$Instance$TimeInformation.TargetWarningDate_B98D2C5F_CBA2_8DB9_CA33_E0F808A9801E,
    dbo.DisplayStringView.DisplayName AS SLAstatus, dbo.MTV_System$WorkItem$Incident.Id_9A505725_E2F2_447F_271B_9B9F4F0D190C,
    dbo.MTV_System$WorkItem$Incident.Title_9691DD10_7211_C835_E3E7_6B38AF8B8104 AS IncidentTile
    FROM dbo.MTV_System$SLA$Instance$TimeInformation INNER JOIN
    dbo.RelationshipView ON dbo.MTV_System$SLA$Instance$TimeInformation.BaseManagedEntityId = dbo.RelationshipView.TargetEntityId INNER JOIN
    dbo.MTV_System$WorkItem$Incident ON dbo.RelationshipView.SourceEntityId = dbo.MTV_System$WorkItem$Incident.BaseManagedEntityId INNER JOIN
    dbo.DisplayStringView ON
    dbo.MTV_System$SLA$Instance$TimeInformation.Status_F632EA19_0367_CC81_BCB5_5E0387B1B5E3 = dbo.DisplayStringView.MPElementId
    WHERE (dbo.RelationshipView.IsDeleted = 0) AND (dbo.RelationshipView.RelationshipTypeId = 'ba08f9bb-85c7-20d8-05e3-0035938cddd5') AND
    (dbo.DisplayStringView.LanguageCode = 'ENU')
    Cheers,
    Marat
    Site: www.scutils.com 
    Twitter: LinkedIn:
    Graveyard:

Maybe you are looking for

  • The hard drive on my 2012 mac mini has broken.

    Poor thing died 5 weeks after the warranty expired.  When I try to repair it in disk utility, I get the message "This drive has a hardware problem that can't be repaired.".  I cannot afford a repair at this time, but I had a 2.5 44.02 GBinch ssd from

  • How to use group by in PL/SQL

    Can anyone give me a clue how to group rows using PL/SQL? I want to make a push button that groups a number of rows. When I run the form and push the button, I get the Oracle 01422 error. I am using one data block and, after pressing execute on the O

  • Dual Core Macbook (2006) and Snow Leopard

    I was ready to pre-order Snow Leopard, but now I'm not sure. I accept that it won't work with my ancient G4, or my old Mac Mini. But ... My wife's Macbook has Dual Core 2. No problem. Mine, however, is the very first Macbook - with only a Dual Core p

  • 6220 Classic and New Battery Fun!

    Hi I have a 6220 Classic and purchased a new Nokia battery for it (as a spare) but when I insert it the phone after maybe 10 mins says "Insert Sim Card" but when I put the battery that came with the phone back in all is fine. Has anyone else had this

  • Flex project into a single SWC file!!

    please help me with this problem: i created an image gallery using actionscript 3.0 classes in Flash CS4...in one of the classes, i used a mask Movieclip to mask the thumbnails in the gallery...this mask movieclip is a rectangle Movieclip symbol in t