๐ง Introduction
As organizations grow, so does their ServiceNow data. From audit logs to attachments and historical records, an unmanaged instance can quickly exceed storage limits — leading to performance degradation, license breaches, or even functionality risks.
In this article, we explore practical and strategic ways to manage your ServiceNow storage footprint, including smart automation like auto-flush rules and how AI can support proactive cleanup and decision-making.
๐งฐ 1. Understand What’s Consuming Space
Start by identifying top storage consumers:
-
Navigate to System Diagnostics → Tables to view table sizes.
-
Focus on heavy tables like
sys_audit
,sys_email
,sys_attachment
,task
, andcmdb_ci
.
๐งพ Script: List tables over 1GB
๐ 2. Use Auto-Flush for Log and System Tables
For fast-growing system tables, auto-flush rules are the recommended method to manage data safely and efficiently.
๐ Examples of flushable tables:
-
syslog_transaction
-
syslog
-
sys_email
-
sys_rollback_sequence
-
sys_audit_delete
-
ecc_queue
๐ ️ Configure via:
System Definition → Auto Flush Rules
๐ง Example: Auto-flush syslog_transaction
older than 30 days:
✅ Auto-flush avoids scripting risks and runs in controlled background processes.
๐งพ 3. Use Retention Policies for Business Data
For structured business records (like incidents or change requests), use:
-
Auto Archive Rules for historical visibility
-
Auto Delete Rules for permanent cleanup when archive isn’t required
-
Data Retention Policies aligned with legal/compliance frameworks
Avoid deleting directly via script unless absolutely necessary.
๐ค 4. AI-Driven Optimization (Emerging Practice)
AI models can enhance storage strategies by:
-
Recommending purge targets based on usage frequency
-
Highlighting duplicate or redundant attachments
-
Analyzing long-running jobs for inefficiencies
๐งพ Script: Identify long-duration scheduled jobs
๐ก 5. Common Pitfalls to Avoid
-
Overusing scripting to delete data: Prefer system-supported methods like auto-flush or retention rules.
-
Archiving ≠ deleting: Archives still consume space, though less than active records.
-
Uncoordinated full data pulls from PROD can lead to slowness, API throttling, or job failures.
-
Neglecting email and attachment tables, which silently grow large.
๐งพ Script: Find attachments >50MB, older than 1 year
๐ 6. Enforce Limits for Integrations and APIs
-
Use properties like
glide.rest.query.max_records
to limit API responses. -
Restrict external integrations from triggering large table queries.
-
Rate-limit ETL tools or enforce best practices on full/delta pulls.
๐งญ 7. Collaborate with Data Consumers
-
Communicate with data warehouse/ETL teams using Table API.
-
Insist that full-load testing happens in non-prod, never directly on production.
-
Prevent SQL teams from running unattended test queries against live instances.
๐ System Tables to Auto-Flush or Archive
Table Name | Reason for Growth | Recommended Action |
---|---|---|
sys_audit | Field change logs | Auto-archive or delete |
sys_email | All email activity | Auto-flush after retention |
syslog_transaction | Transaction logs | Auto-flush older entries |
sys_rollback_sequence | Workflow rollback data | Auto-flush |
sys_attachment_doc | File storage | Identify & purge large/old |
๐ Conclusion
Managing storage in ServiceNow is about more than just saving disk space. It’s a proactive approach to maintaining performance, cost efficiency, and platform health. With the right mix of auto-flush, retention rules, and even AI-enhanced analysis, you can keep your instance lean and compliant — while avoiding manual, error-prone deletion methods.