Introduction
This document describes the maximum amount of Data than can be processed through an Intelligent Contact Management (ICM) Message Delivery Service (MDS) Message and the architecture behind it.
Background Information
When performing Database lookups with ICM (using dbworker.exe as the process to provide the interface between Router and the external Database), there is a maximum amount of Data than can be processed through a MDS Message.
The total amount of structured query language (SQL) Response data + db worker process (DBW) Response header cannot exceed 4096 bytes. This is a hardcoded limit for a MDS message.
Components Used
The information in this document is based on ICM version 11.6
Problem
If too much data was returned to dbw from SQL Server, and dbw cannot pass it to the router (RTR), an error condition is generated, similar to this one:
06:33:38:639 ra-dbw Trace: Queue a lookup request
06:33:38:644 ra-dbw Trace: DBWorker Thread 4 (ID 5612 Table:Stores_Reception_BT.SRDB_NEW): Received request: transactionID 14583170
06:33:38:658 ra-dbw Trace: DBWorker Thread 4 (ID 5612),transactionID 14583170, Attempt to read the record:
06:33:38:679 ra-dbw Trace: DBWorker Thread 4 (ID 5612),transactionID 14583170, Succeeded.(…)
06:33:38:735 ra-dbw Trace: DBWorker transactionID 14583170, Failed! result=10
06:33:38:745 ra-dbw Trace: Queue a lookup request
“10” – means that too much data was returned to dbw from SQL Server, and dbw can’t pass it to the RTR
In order to print the error, this trace level is used:
dbw trace-level to 3 via Portico (trace level 3 is only to be used at the recommendation of Cisco TAC) , and this trace-level for RTR via rtrtrace tool(c:\icm\bin):
Here is an example of how an MDS message is being formed by the DBW process:
02:22:01:273 ra-dbw Trace: DBWorker Thread 2 (ID 15100 Table:ICM_lookup_1): Received request: transactionID 3
02:22:01:273 ra-dbw Trace: DBWorker Thread 2 (ID 15100),transactionID 3, Attempt to read the record:
02:22:01:273 ra-dbw Trace: DBWorker Thread 2 (ID 15100),transactionID 3, Succeeded.
02:22:01:273 ra-dbw Trace: MDS: Entering MDSAllocBuffer
02:22:01:273 ra-dbw Trace: SQLConnection::SetupColumnData: Column data for column 1 Length = 5
02:22:01:273 ra-dbw Trace: SQLConnection::SetupColumnData: Column data for column 2 Length = 0
02:22:01:273 ra-dbw Trace: SQLConnection::SetupColumnData: Column data for column 3 Length = 0
02:22:01:273 ra-dbw Trace: MDS: Entering MDSSendInput02:22:01:273 ra-dbw Message Trace: Client: dbw sending message to MDS process.
EMT: class=2 type=1 bodysize=116
MDS: rsrvd=0 hdrsize=16 bodysize=100 src=56 dst=1 priority=high
MDS: flags=02 { side_a } vtime=0006f03b seqno=0000 class=4 type=16
00000 03 00 00 00 00 00 00 00 |........|
00008 03 00 00 00 8e 13 00 00 |........|
00010 02 00 00 00 00 00 00 00 |........|
00018 00 00 00 00 00 00 00 00 |........|
00020 00 00 00 00 05 00 38 30 |......80|
00028 31 30 34 00 8c 13 00 00 |104.....|
00030 02 00 00 00 00 00 00 00 |........|
00038 00 00 00 00 00 00 00 00 |........|
00040 00 00 00 00 00 00 00 00 |........|
00048 8d 13 00 00 02 00 00 00 |........|
00050 00 00 00 00 00 00 00 00 |........|
00058 00 00 00 00 00 00 00 00 |........
00060 00 00 00 00
In this example there are 3 columns as a result of SQL-query to configured table, all columns have VARCHAR(50) type in DB.
The Response contains 5 bytes data from 1st column and 0 bytes in the other 2 columns.
Based on that response dbw forms the MDS message where each column is packed in field which consists of 24 bytes header + 2 bytes length + PAYLOAD + OFFSET.
If the column doesn’t contain data, e.g. Length = 0, it will still occupy: 24 bytes header + 2 bytes length + 2 bytes OFFSET = 28 bytes.
Solution
To workaround this scenario, you will want to remove unused columns from tables/config or shrink column names, or shrink column data sizes.
Related Documents:
https://www.cisco.com/c/en/us/support/docs/customer-collaboration/unified-contact-center-enterprise/116215-configure-dblookup-00.html