What This Table Is

The sys_update_xml table captures individual configuration changes as XML payloads within update sets. Each record represents a single modification to a configuration item—whether it's a Business Rule, UI Policy, or custom table field. When you modify any configuration through Studio or direct table manipulation, ServiceNow automatically creates these records to track what changed.

Owned by the Development module, this table supports ServiceNow's entire change management and deployment pipeline. Update sets depend on these records to know what to migrate between instances. The table stores the complete before-and-after state of configuration items as XML, making it possible to replay changes on target instances or roll back modifications.

This table doesn't extend any parent table—it's a standalone configuration tracking mechanism. No tables extend sys_update_xml either. It has a direct many-to-one relationship with sys_update_set records, where each update set can contain thousands of individual XML entries.

In large enterprises, this table grows exponentially—a typical production instance might contain 500K+ records spanning years of configuration changes. The payload field can store massive XML documents, making queries expensive without proper filtering. Most instances implement retention policies to archive or delete old update set entries to maintain performance.

When You'll Script Against This Table

You'll primarily script against sys_update_xml in Background Scripts for deployment automation, Script Includes for custom update set utilities, and Scheduled Jobs for cleanup operations. Developers also query this table in Business Rules when they need to track what specific configurations changed during update set commits. The most common context is building custom deployment pipelines that need to analyze or manipulate update set contents before migration.

Access requires the admin role or specific rights to the sys_update_xml table. Most scoped applications can read these records but cannot modify them. Global scope provides full access, but modifying update set entries outside of ServiceNow's native processes can corrupt deployments.

Common scripting patterns:

  • Querying all changes within a specific update set for deployment validation
  • Filtering by target_name to find changes to specific configuration items
  • Parsing XML payloads to extract field values or detect conflicts before merging
  • Counting changes by table name to generate deployment reports
  • Creating custom update set merge tools that resolve conflicts programmatically
  • Building deployment audit trails that track what changed and when
  • Archiving or deleting old update set entries for performance maintenance

Table Gotchas

⚠️

The payload field contains raw XML that can exceed 4MB for complex configurations. Querying without proper limits can cause memory issues and slow performance.

  • The state field uses string values ('current', 'previous') not choice values—filtering requires exact string matches
⚠️

Records with action='DELETE' have empty payload fields—the XML represents the deleted state, not the current configuration.

  • The target_name field stores the configuration item name, but for custom table fields it includes the full table.field_name format
  • Only sys_created_on and update_set fields are indexed—queries on other fields perform full table scans
⚠️

Deleting sys_update_xml records breaks update set integrity—ServiceNow expects these records to exist for proper deployment and rollback functionality.

  • XML parsing requires the XMLDocument API—standard JavaScript XML methods don't work in ServiceNow's server-side environment
Free Newsletter

Enjoying this? Get one deep-dive per week.

Join 1,000+ ServiceNow pros — scripts, GlideRecord patterns, Flow Designer techniques, and career moves. Free.

No spam · Unsubscribe anytime

The primary relationship is with sys_update_set through the update_set reference field. This parent-child relationship defines which changes belong to which update set. Developers constantly join these tables to filter changes by update set state, name, or creation date. The sys_update_set table provides metadata like who created the update set and when it was last modified.

Common cross-references include sys_user for tracking who made changes, and sys_scope for identifying which application scope contains the modified configurations. When building deployment reports, developers often join with sys_metadata to get additional context about the configuration items being changed.

For conflict detection and merge operations, developers query sys_update_xml alongside the actual configuration tables (like sys_script for Business Rules or sys_ui_policy for UI Policies) to compare the XML representation against the current live configuration. This pattern helps identify what changed between environments and prevent deployment conflicts.