What This Table Is
The ecc_queue table serves as the message queue between your ServiceNow instance and MID Servers. Every probe sent to a MID Server creates an output queue record, and every response from sensors creates an input queue record. This bidirectional communication channel is the backbone of ITOM Discovery, Service Mapping, and Cloud Management operations.
Owned by the Platform module, this table supports the entire MID Server ecosystem. Records flow through states from ready to sent to processed within seconds or minutes. Unlike most ServiceNow tables, these records are transient—they exist only long enough to facilitate communication before being processed and potentially cleaned up.
This table extends sys_metadata and has no child tables. The queue field determines message direction: output for instance-to-MID messages (probes) and input for MID-to-instance responses (sensor results).
In large enterprises, this table processes thousands of records per hour during Discovery runs. The table is heavily indexed on agent and state fields to support MID Server polling, but unfiltered queries can still timeout due to record volume. Background cleanup jobs regularly purge processed records, so historical analysis requires careful timestamp filtering.
When You'll Script Against This Table
Most developers encounter this table during ITOM troubleshooting rather than regular application development. You'll script against ecc_queue in Business Rules on Discovery or Service Mapping tables, Script Includes for MID Server health monitoring, and Scheduled Jobs for queue maintenance. Custom probes and sensors also create records programmatically through the MID Server API.
The admin role provides full access, while itil users can read records. MID Server accounts have specialized ACLs for their designated records only. Global scoped applications can query freely, but scoped apps may need explicit table access grants.
Common scripting patterns:
- Monitor probe failures by querying error states for specific MID Servers
- Track Discovery progress by counting processed vs. total probe records
- Build custom MID Server health dashboards using queue depth metrics
- Debug probe payloads by examining XML content in failed records
- Create custom probes through Script Includes that populate the output queue
- Clean up stale records with maintenance jobs based on age and state
- Generate MID Server utilization reports by analyzing message volume trends
Table Gotchas
Records in this table have a very short lifecycle. Never assume a record will exist minutes after creation—background processes clean up processed records regularly.
The payload field contains XML that can be massive (>1MB for some Discovery probes). Avoid SELECT * queries and don't iterate through payload content in loops.
- The
statefield uses different values for input vs. output queues—readymeans "waiting to be sent" for output but "received and ready to process" for input - Records with
state=errorpersist longer than successful ones, which can skew historical analysis toward failures
Queries without agent filtering hit multiple MID Servers' records and can timeout. Always filter by specific MID Server or use timestamp windows.
- The
sequencefield increments per MID Server, not globally—don't use it for cross-MID ordering - MID Server polling updates the
sys_updated_ontimestamp even when no data changes, making it unreliable for change tracking
Enjoying this? Get one deep-dive per week.
Join 1,000+ ServiceNow pros — scripts, GlideRecord patterns, Flow Designer techniques, and career moves. Free.
Related Tables
The ecc_agent table defines the MID Servers themselves and connects through the agent field. Every queue record belongs to exactly one MID Server, and understanding MID Server configuration often requires joining these tables to check capabilities, status, and IP ranges.
Discovery operations link through discovery_status for tracking overall progress and cmdb_ci for the configuration items being discovered. The cmdb_rel_ci table captures relationships identified through sensors, while sa_pattern defines the Discovery patterns that generate many of the probes flowing through this queue.
For troubleshooting, the ecc_agent_log table provides detailed MID Server activity logs that complement queue analysis. Developers building comprehensive Discovery monitoring often query across all these tables to correlate probe failures with MID Server health, pattern execution, and resulting CI updates.