<?xml version="1.0" encoding="UTF-8"?>
<!-- generator="FeedCreator 1.8" -->
<?xml-stylesheet href="http://orourke.tv/web/lib/exe/css.php?s=feed" type="text/css"?>
<rss version="2.0">
    <channel xmlns:g="http://base.google.com/ns/1.0">
        <title>orourke.tv - vendors:cisco:uc:icm:sql</title>
        <description>every banana has 5 sides</description>
        <link>http://orourke.tv/web/</link>
        <lastBuildDate>Thu, 16 Apr 2026 17:49:20 +0000</lastBuildDate>
        <generator>FeedCreator 1.8</generator>
        <image>
            <url>http://orourke.tv/web/lib/exe/fetch.php?media=wiki:dokuwiki.svg</url>
            <title>orourke.tv</title>
            <link>http://orourke.tv/web/</link>
        </image>
        <item>
            <title>agent</title>
            <link>http://orourke.tv/web/doku.php?id=vendors:cisco:uc:icm:sql:agent&amp;rev=1590419752&amp;do=diff</link>
            <description>UCCE Agent SQL

Agent &lt;&gt; Teams


SELECT     
AgentSkillTargetID = Agent.SkillTargetID, 
TeamID = isNull(Agent_Team_Member.AgentTeamID,&#039;0&#039;), 
PersonalID = Agent.PersonID, 
AgentPeripheralNumber = Agent.PeripheralNumber,
FirstName = Person.FirstName, 
LastName = Person.LastName, 
LoginName = Person.LoginName,
TeamName = isNull(Agent_Team.EnterpriseName,&#039;No Team Assigned&#039;)

FROM Agent
LEFT JOIN Agent_Team_Member ON Agent.SkillTargetID = Agent_Team_Member.SkillTargetID
LEFT JOIN Agent_Team ON Agent_…</description>
            <author>anonymous@undisclosed.example.com (Anonymous)</author>
            <pubDate>Mon, 25 May 2020 15:15:52 +0000</pubDate>
        </item>
        <item>
            <title>bucket</title>
            <link>http://orourke.tv/web/doku.php?id=vendors:cisco:uc:icm:sql:bucket&amp;rev=1601622746&amp;do=diff</link>
            <description>Custom Call Type - Bucket Reports

Call Type Answered Custom Bucket Interval Report


SET ARITHABORT OFF SET ANSI_WARNINGS OFF SET NOCOUNT ON 
SET TRANSACTION ISOLATION LEVEL READ UNCOMMITTED
 
;WITH TEMP_TABLE1 AS (
SELECT 
CallTypeID=TCD.CallTypeID
,CASE 
WHEN NetQTime &gt;=0 AND NetQTime &lt;= 20  THEN 1
WHEN NetQTime &gt; 20 AND NetQTime &lt;= 60 THEN 2
WHEN NetQTime &gt; 60 AND NetQTime &lt;= 180 THEN 3
WHEN NetQTime &gt; 180 AND NetQTime &lt;= 300 THEN 4
WHEN NetQTime &gt; 300 AND NetQTime &lt;= 600 THEN 5
WHEN NetQTim…</description>
            <author>anonymous@undisclosed.example.com (Anonymous)</author>
            <pubDate>Fri, 02 Oct 2020 07:12:26 +0000</pubDate>
        </item>
        <item>
            <title>config</title>
            <link>http://orourke.tv/web/doku.php?id=vendors:cisco:uc:icm:sql:config&amp;rev=1669119953&amp;do=diff</link>
            <description>UCCE Config Queries

ICR_Globals is the table where system default infor is stored, such as default CallType threshold

Agent


SELECT     
Agent.SkillTargetID, 
Agent.PeripheralID,
Agent.PeripheralNumber,
Agent.PersonID, 
Person.FirstName, 
Person.LastName, 
Person.LoginName,
Agent_Team.EnterpriseName AS AgentTeamName

FROM Agent

LEFT JOIN Agent_Team_Member ON Agent.SkillTargetID = Agent_Team_Member.SkillTargetID
LEFT JOIN Agent_Team ON Agent_Team_Member.AgentTeamID = Agent_Team.AgentTeamID
LE…</description>
            <author>anonymous@undisclosed.example.com (Anonymous)</author>
            <pubDate>Tue, 22 Nov 2022 12:25:53 +0000</pubDate>
        </item>
        <item>
            <title>ewt</title>
            <link>http://orourke.tv/web/doku.php?id=vendors:cisco:uc:icm:sql:ewt&amp;rev=1675349524&amp;do=diff</link>
            <description>EWT TCD Report

Note - EWT value is set on PV6


SET ARITHABORT OFF SET ANSI_WARNINGS OFF SET NOCOUNT ON 
SET TRANSACTION ISOLATION LEVEL READ UNCOMMITTED

SELECT TOP (8001)
 CallStartDateTime = DATEADD(MINUTE,-TCD.TimeZone,TCD.StartDateTimeUTC)
,CallDisconectDateTime  = DATEADD(SECOND,TCD.HoldTime,(DATEADD(SECOND,TCD.TalkTime,(DATEADD(SECOND,TCD.RingTime,(DATEADD(SECOND,TCD.LocalQTime,(DATEADD(SECOND,TCD.NetQTime,(DATEADD(SECOND,TCD.DelayTime,(DATEADD(MINUTE,-TCD.TimeZone,TCD.StartDateTimeUTC))…</description>
            <author>anonymous@undisclosed.example.com (Anonymous)</author>
            <pubDate>Thu, 02 Feb 2023 14:52:04 +0000</pubDate>
        </item>
        <item>
            <title>inventory</title>
            <link>http://orourke.tv/web/doku.php?id=vendors:cisco:uc:icm:sql:inventory&amp;rev=1580309699&amp;do=diff</link>
            <description>UCCE Inventory SQL

This query is used against the AWDB or against the pcceInventory database and will show the configuration of the system


SELECT MH.HostName, MH.MachineName, MA.Address
, MS.Description, MS.ServicePort, MS.UserName, MS.Password, MS.EnablePassword
FROM Machine_Host MH (NOLOCK)
JOIN Machine_Address MA (NOLOCK) ON MA.MachineHostID = MH.MachineHostID
JOIN Machine_Service MS (NOLOCK) ON MS.MachineAddressID = MA.MachineAddressID</description>
            <author>anonymous@undisclosed.example.com (Anonymous)</author>
            <pubDate>Wed, 29 Jan 2020 14:54:59 +0000</pubDate>
        </item>
        <item>
            <title>lcm</title>
            <link>http://orourke.tv/web/doku.php?id=vendors:cisco:uc:icm:sql:lcm&amp;rev=1526583387&amp;do=diff</link>
            <description>LCM SQL


USE LCMReports
SELECT [CallOutcome]
      ,CASE(CallOutcome)
	  WHEN &#039;0&#039; THEN &#039;OUTCOME_SUCCESS&#039;
      WHEN &#039;1&#039; THEN &#039;OUTCOME_ABANDONED&#039;
      WHEN &#039;2&#039; THEN &#039;OUTCOME_INVALID&#039;
      WHEN &#039;3&#039; THEN &#039;OUTCOME_BUSY&#039;
      WHEN &#039;4&#039; THEN &#039;OUTCOME_CALLBACK&#039;
      WHEN &#039;5&#039; THEN &#039;OUTCOME_DNC&#039;
      WHEN &#039;6&#039; THEN &#039;OUTCOME_FAX&#039;
      WHEN &#039;7&#039; THEN &#039;OUTCOME_MACHINE&#039;
      WHEN &#039;8&#039; THEN &#039;OUTCOME_NOANS&#039;
      WHEN &#039;10&#039; THEN &#039;OUTCOME_REJECTED&#039;
      WHEN &#039;11&#039; THEN &#039;OUTCOME_WRONGPARTY&#039;
      WHEN &#039;12&#039; TH…</description>
            <author>anonymous@undisclosed.example.com (Anonymous)</author>
            <pubDate>Thu, 17 May 2018 18:56:27 +0000</pubDate>
        </item>
        <item>
            <title>outbound</title>
            <link>http://orourke.tv/web/doku.php?id=vendors:cisco:uc:icm:sql:outbound&amp;rev=1636554857&amp;do=diff</link>
            <description>UCCE Outbound SQL Queries

Dialer Detail Query


SET ARITHABORT OFF SET ANSI_WARNINGS OFF SET NOCOUNT ON 
SET TRANSACTION ISOLATION LEVEL READ UNCOMMITTED

--USE &lt;cust_awdb&gt;

SELECT     
	Dialer_Detail.DateTime,
--Dialer_Detail.DbDateTime,
	Campaign.CampaignName, 
--Dialer_Detail.CampaignID AS CampaignID,
Query_Rule.QueryRuleName, 
--Dialer_Detail.QueryRuleID AS QueryRuleID, 
Import_Rule.ImportRuleName, 
--Query_Rule.ImportRuleID, 
--Import_Rule.FilePath, 
--Dialer_Detail.DialingListID AS Campai…</description>
            <author>anonymous@undisclosed.example.com (Anonymous)</author>
            <pubDate>Wed, 10 Nov 2021 14:34:17 +0000</pubDate>
        </item>
        <item>
            <title>parsing</title>
            <link>http://orourke.tv/web/doku.php?id=vendors:cisco:uc:icm:sql:parsing&amp;rev=1733497465&amp;do=diff</link>
            <description>SQL Parsing PV Variable Example


WITH SplitData AS (
    SELECT 
        [RecoveryKey],
		[DateTime],
        [DialedNumberString],
		[Variable9],
        value AS PartValue,
        ROW_NUMBER() OVER (PARTITION BY RecoveryKey ORDER BY (SELECT NULL)) AS PartNumber
    FROM Route_Call_Detail RCD 
    CROSS APPLY STRING_SPLIT(Variable9, &#039;|&#039;)
	WHERE Variable9 LIKE &#039;TST|%&#039; AND DateTime &gt; GetDate()-1
)
SELECT 
    RecoveryKey,
	DateTime,
	DialedNumberString,
	Variable9,
    MAX(CASE WHEN PartNumber …</description>
            <author>anonymous@undisclosed.example.com (Anonymous)</author>
            <pubDate>Fri, 06 Dec 2024 15:04:25 +0000</pubDate>
        </item>
        <item>
            <title>route</title>
            <link>http://orourke.tv/web/doku.php?id=vendors:cisco:uc:icm:sql:route&amp;rev=1580917700&amp;do=diff</link>
            <description>UCCE Route &amp; TCD SQL

Schema Reference:

&lt;http://www.cisco.com/c/en/us/td/docs/voice_ip_comm/cust_contact/contact_center/icm_enterprise/icm_enterprise_10_5_1/Reference/Guide/UCCE_BK_DDE31A79_00_database-schema-handbook-icm-cce/UCCE_BK_DDE31A79_00_database-schema-handbook-icm-cce_chapter_011.html#UCCE_TP_R73CF0D9_00&gt;

Route Error Codes Reference:

&lt;http://docwiki.cisco.com/wiki/Router_Error_Codes&gt;

Distinct ANI Query From TCD table Collection for CUIC


SELECT DISTINCT TOP 3000 ANI as ID, ANI as …</description>
            <author>anonymous@undisclosed.example.com (Anonymous)</author>
            <pubDate>Wed, 05 Feb 2020 15:48:20 +0000</pubDate>
        </item>
        <item>
            <title>script</title>
            <link>http://orourke.tv/web/doku.php?id=vendors:cisco:uc:icm:sql:script&amp;rev=1621262522&amp;do=diff</link>
            <description>UCCE Script

Target Types
 Target Type Values   Meaning                         0                    Unknown                         1                    Service                         2                    Skill Group                     3</description>
            <author>anonymous@undisclosed.example.com (Anonymous)</author>
            <pubDate>Mon, 17 May 2021 14:42:02 +0000</pubDate>
        </item>
        <item>
            <title>scriptdata</title>
            <link>http://orourke.tv/web/doku.php?id=vendors:cisco:uc:icm:sql:scriptdata&amp;rev=1668187370&amp;do=diff</link>
            <description>UCCE Script Data SQL

How to find the Queue Priority&#039;s set in your scripts

Many thanks to the Gary Fearn for the SQL and details on how to do this

His website containing this info can be found here:

Reference:
&lt;https://ciscocontactcentersecrets.wordpress.com/&gt;

I copied some of the SQL here - as the format from the above webpage corrupted it when I copied and pasted.</description>
            <author>anonymous@undisclosed.example.com (Anonymous)</author>
            <pubDate>Fri, 11 Nov 2022 17:22:50 +0000</pubDate>
        </item>
        <item>
            <title>tcd-tcv</title>
            <link>http://orourke.tv/web/doku.php?id=vendors:cisco:uc:icm:sql:tcd-tcv&amp;rev=1712941835&amp;do=diff</link>
            <description>TCD SQL

TCD Example


 SELECT TOP (8001)
 TCDRecoveryKey = TCD.RecoveryKey
,PeripheralName = Peripheral.EnterpriseName
,RecordStartDateTimeUTC = TCD.StartDateTimeUTC
,DbDateTime=TCD.DbDateTime
,CallStartDateTime = DATEADD(MINUTE,-TCD.TimeZone,TCD.StartDateTimeUTC)
,CallConnectDateTime  = DATEADD(SECOND,TCD.RingTime,(DATEADD(SECOND,TCD.LocalQTime,(DATEADD(SECOND,TCD.NetQTime,(DATEADD(SECOND,TCD.DelayTime,(DATEADD(MINUTE,-TCD.TimeZone,TCD.StartDateTimeUTC)))))))))
,CallDisconectDateTime  = DATEAD…</description>
            <author>anonymous@undisclosed.example.com (Anonymous)</author>
            <pubDate>Fri, 12 Apr 2024 17:10:35 +0000</pubDate>
        </item>
        <item>
            <title>ucce-to-pcce</title>
            <link>http://orourke.tv/web/doku.php?id=vendors:cisco:uc:icm:sql:ucce-to-pcce&amp;rev=1630660410&amp;do=diff</link>
            <description>UCCE to PCCE Migration

	* Make sure Apache is working on all ICM servers - check via the setup url
	* MR PG needs to have all Peripherals configured on it and the Multimedia ones marked as Multimedia.
		*  Names, Peripheral Name and Routing Client Name all the same and as per below:</description>
            <author>anonymous@undisclosed.example.com (Anonymous)</author>
            <pubDate>Fri, 03 Sep 2021 09:13:30 +0000</pubDate>
        </item>
        <item>
            <title>unusedcalltypes</title>
            <link>http://orourke.tv/web/doku.php?id=vendors:cisco:uc:icm:sql:unusedcalltypes&amp;rev=1557241935&amp;do=diff</link>
            <description>Unused CallTypes

Calltypes configured but NOT in the Historical Interval Table


SET ARITHABORT OFF SET ANSI_WARNINGS OFF SET NOCOUNT ON 
SET TRANSACTION ISOLATION LEVEL READ UNCOMMITTED

;WITH Unused_CallTypes AS
(
SELECT 
       CT.[CallTypeID]
      ,CT.[EnterpriseName]
      ,CT.[Description]
      ,CT.[Deleted]
      ,CT.[ChangeStamp]
      ,CT.[DateTimeStamp]
  FROM [aib_awdb].[dbo].[Call_Type] CT
  LEFT JOIN Call_Type_Interval CTI ON CTI.CallTypeID = CT.CallTypeID
  Where CTI.CallTypeID …</description>
            <author>anonymous@undisclosed.example.com (Anonymous)</author>
            <pubDate>Tue, 07 May 2019 15:12:15 +0000</pubDate>
        </item>
    </channel>
</rss>
