Skip to content

Profile a SQL Server Database ​

This guide explains how to profile a Microsoft SQL Server database from a Migration project — a statistical profile of the database that feeds its data quality report, for example as part of a data quality assessment before a migration.

Overview ​

The Profile database operation inspects a database from the inside and produces a profile document describing:

SectionWhat it tells you
InventoryEvery table with its schema, row count, size, and column definitions
Column statisticsPer column: how many values are empty, how many distinct values exist, and the value range
Value distributionsThe most frequent values for columns with a limited set of values (for example, a status column)
Relationship healthDeclared relationships between tables, whether the database has actually verified them, and how many rows point to a parent row that doesn't exist
Relationship candidatesColumns that look like they reference another table but have no declared relationship

The profile helps you answer questions like: Which tables matter? How complete is the data? Can we trust the relationships between tables?

Privacy by design

The profiling runs entirely inside the database and only reads aggregated statistics — counts, ranges, and frequencies. It never exports rows. If even sample values (such as the smallest and largest value of a column) are not acceptable, turn off Include value samples and the profile contains no data values at all.

Prerequisites ​

  1. A Migration project — profiling lives on Migration projects only (see Projects)
  2. A Microsoft SQL Server connector for the database, linked to the project on the Data sources tab (see Link Connectors and Workflows). Profiling is offered only for sources whose connector supports it.
  3. The database account only needs read access to the database

Run the profile ​

  1. Open the project and select the Data profile tab
  2. Choose the source to profile
  3. Select Run profile (or Re-run profile to refresh an existing one)

The profile runs in the background with sensible defaults. When it finishes, the tab shows the table inventory, completeness, keys, relationship health, and what the run didn't cover. The data quality report then interprets it.

Advanced: run with custom settings ​

Running from the Data profile tab uses default settings. To control the depth or tighten the bounds — for example on a very large database — run the connector's Profile database operation directly: go to Integrations → Connectors, open your SQL Server connector, select the Profile database operation, adjust the settings below, and run it.

Profile depth ​

The Profile depth setting controls how much work the operation does:

DepthWhat runsWhen to use
CatalogInventory only — no table is scannedA quick first look, or very large databases
StandardAdds per-column statistics and relationship checksThe default for most assessments
FullAdds value distributions for categorical columnsWhen you want the complete picture

Settings ​

The defaults are chosen so a typical database is profiled completely. For very large databases you can tighten the bounds:

SettingWhat it does
Include schemas / Exclude schemasLimit the profile to specific database schemas
Profile depthSee Step 1
Top values per columnHow many of the most frequent values are reported per categorical column
Max tables for column statisticsOnly the smallest N tables get per-column statistics; larger ones stay inventory-only
Per-query timeout (seconds)A query that exceeds this is skipped and reported; the run continues
Max orphan checksUpper bound on the number of relationship checks
Include value samplesTurn off to produce a profile with no data values at all

Reading a bounded profile

When a bound is hit (for example on a database with more tables than Max tables for column statistics), the skipped work is listed in the profile's truncations section — nothing is silently dropped. The largest tables are the ones skipped first, so if the truncations section is not empty, consider raising the bound and running again.

Database permissions ​

The operation adapts to what the database account is allowed to see:

  • With standard read access plus permission to view database state, the profile includes table sizes.
  • With read access only, the profile still contains row counts and all statistics, but no size information. The profile records which level was used, so you always know how to read the numbers.

Long-running profiles

On large databases a Full-depth profile can take a while. It runs safely in the background, and every individual query is bounded by the per-query timeout — a slow or denied query is recorded in the profile's error list and never aborts the run.