Skip to main content
Version: 3.2

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.

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.

  1. Select a table from the dropdown.
  2. Cortex scans candidates rediscovering each via the real attachment path.
  3. 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.

(ServiceNow archives) Diagnose why related list tabs on record forms appear empty. 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 task physical 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

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.