Database Inspector & Diagnostics
Cortex includes diagnostic tools accessible from the Database Inspector for troubleshooting archive data sources. These are available by navigating to Admin → Database Inspector and selecting the relevant data source.
Available Diagnostics
Table Sizes
Displays per-table on-disk size and estimated row count for the selected archive, sorted from largest to smallest. This is useful for identifying which tables consume the most storage and understanding the scale of data in your archive.
The tool is engine-aware and uses the cheapest available catalog views for each database type.
Orphaned Assignments
(Cherwell archives) Finds teams and users that are still assigned to records but no longer exist in the archive's TeamInfo / UserInfo tables. These orphaned assignments can cause data validation issues during data migrations to another platform, where the assignment cannot be resolved.
Cortex works out per table whether the assignments use the AssignedTo / AssignedTeam pair or the older OwnedBy / OwnedByTeam pair, so tables with either convention are covered.
Two scopes are available:
- All Major Business Objects - scans the major business objects and shows only the tables that have findings.
- A single table - always reports the result for the table you pick, including when there are no orphaned assignments.
Results are listed per table as the orphaned users and the orphaned teams found there, so you can hand the list to whoever owns the data before a migration.
Value Search
Search for a specific value across all tables and columns in the archive database. This is useful for locating records when you know a value (e.g., an email address, ticket number, or asset tag) but aren't sure which table or column it's stored in.
- Supports exact match and substring search
- Reports which database table, Cortex table, and column contain the value
- Live counter shows progress as tables are scanned
- Generate Full Query button produces the actual SQL for reference
- Configurable timeouts to prevent long-running scans
Attachment Finder
Diagnose attachment loading issues by finding the first record that actually has a loadable attachment.
- Select a table from the dropdown.
- Cortex scans candidates rediscovering each via the real attachment path.
- Results show the found record's fields and attachment list.
If no loadable attachments are found, the tool reports how many candidates were inspected and why they failed.
Related List Diagnostics
(ServiceNow archives) Diagnose why related list tabs on record forms appear empty.
Pick the table you are investigating, and - when the record form you are looking at uses a specific form view - pick that view as well. The view list is built from the views that actually have related-list headers, with the Default view first, so the scan reflects the headers a record under that view would really use.
For each related list, the tool reports:
- Ok/Tab — the related list is renderable
- Missing table — the related list's target table does not exist (common with task-subclass TPH tables sharing the
taskphysical table) - Missing reference column — the reference field is not found on the physical table
- Missing mapping — the reference field cannot be mapped to a physical column
- Self-reference/Duplicate — the related list references the same table or is a duplicate
- Virtual/redirect — the related list is a virtual table or redirects to another table
A scan also reports the outcome of the resolution as a whole:
- An outcome indicator — success, a warning when Cortex had to fall back to the Default view's headers (so the form may be showing a different set of tabs than the view you selected), or an error when related lists were expected but nothing could be rendered.
- A plain-language verdict, which separates the three situations worth telling apart: the table has no related-list metadata at all and nothing is expected, headers exist but nothing they reference can be found on the mirror, or Cortex resolved the tabs by falling back to the Default view.
- A Resolution trace — the view that was requested, the headers that were loaded and which views they belong to, whether a fallback happened, how many entries were examined, and how many tabs were finally rendered.
- A View column on the per-entry reasons grid, showing which form view each entry came from.
The diagnostic uses the same real resolver path as the record form UI, so results match exactly what users see.
View Query Diagnostic
(ServiceNow archives — admin only) On each related list tab, click to capture the exact SQL and parameters Cortex uses to load that tab. This helps diagnose why a related list returns no results or errors, by showing you the actual query sent to the database.
Reference Field Diagnostic
(ServiceNow archives — admin only) When a reference field on a record form appears blank, click the info (i) icon next to the field to open the diagnostic dialog. It shows:
- Dictionary metadata for the field
- The resolved target table
- The display column and why it was chosen
- "Why display is NULL" — the specific reason the display value is empty
- The exact SQL Cortex uses to populate the field
This is especially useful for vendor mirrors with unusual physical naming conventions.
Field Type Mismatch Tool
(ServiceNow archives) Identifies columns where the sys_dictionary expected data type differs from the actual physical DATA_TYPE in the database. Type mismatches cause errors like operator does not exist: text <> numeric in PostgreSQL.
Each match shows:
- Expected type (from
sys_dictionary) - DB column type (actual physical type)
- Current type (with override badge if already fixed)
- Editable dropdown to suggest a fix, which upserts a
ServiceNowFieldTypeOverride
Note: This diagnostic was absorbed into the Related List view in the Database Inspector.
Theme Definitions Browser
(Cherwell archives) Browse and debug theme information from your Cherwell database. Supports both legacy and G2 Universal themes.
- View all ThemeDefs with raw XML
- Browse ThemeItemList with color preview swatches
- View ThemeCustomColorAssociation ID-to-PaletteColor mappings
- Browse PaletteColorList and CustomPaletteColorList
See the Cherwell Theme System page for details on theme definitions and debugging.
Style Debugger
(Cherwell archives) Double-click any form control in the Inspector to see the resolved colors (background, foreground, border) with full resolution chain traces, including G2 palette color lookups.
Blocked Database Requests
Monitors and reports on database queries that are blocked or taking longer than expected, helping identify performance bottlenecks across all archive data sources.