Microsoft SQL Server
Microsoft SQL Server
Scan Microsoft SQL Server tables and views.
- Category
- Databases
- Source type
- MSSQL
- Produces
- table
SQL Server sits at the centre of most Microsoft-estate data platforms, usually holding the systems of record — finance, HR, CRM. It is also the source with the richest lineage story of the classic databases, because SQL Server itself tracks what depends on what.
What you need to connect
Host, port, and a login. Two authentication modes are supported: a plain SQL Server login, or LDAP / Active Directory, where the domain is prefixed to the username for you. Amazon RDS instances are detected automatically from the host name, and can be forced either way if detection guesses wrong.
Grant the login read access only — db_datareader plus VIEW DEFINITION where
you want lineage from views and stored procedures.
What Classifyre reads
Tables and views, across one database or all of them, scoped by schema allow- and denylists or by an explicit object list.
Shared behaviour · SQL databases
One asset per table or view, never one per row. The asset carries the table's structure — database, schema, table name, object type, its columns and their types, and a row-count estimate — and its content is a sample of real rows, formatted so a detector reads actual values rather than a schema dump.
How many rows, and which ones, is entirely up to the sampling strategy. Large tables are paged through by key rather than by OFFSET, so a scan that stops halfway can resume from where it left off instead of re-reading from the top.
Read-only throughout. The connector issues catalog queries and bounded SELECTs. Nothing is written back, and a read-only account is the right account to give it.
Relationships come out of the engine's own catalog: foreign keys are recorded as REFERENCE links — useful, but they move no data, so they never become a lineage hop, and a view and the tables it reads from are recorded as FLOW — real lineage, with column-level detail parsed out of the view's SQL where the SQL makes that possible. See Lineage.
Metadata on every asset
Asset kind · table
| Field | Type | Always present | What it is |
|---|---|---|---|
| database | string | Yes | Database or catalog name |
| table_name | string | Yes | Table name |
| table_type | string | Yes | Object type (TABLE/VIEW) |
| schema | string | No | Schema name |
| columns | object[] | No | Columns as {name, type} objects |
| row_count | integer | No | Estimated number of rows |
| object_type | string | No | Source object type |
| is_aws_rds | boolean | No | Whether the server is AWS RDS SQL Server |
Lineage
Lineage
SQL Server exposes dependency metadata directly, which makes it one of the strongest lineage sources available:
- View lineage — every view and the tables and views it reads, optionally with column-level detail straight from SQL Server’s own dependency information rather than parsed from text.
- Query lineage — what the queries that actually ran did, read from Query Store and the dynamic management views. You control how many queries are analysed, how often a query must have run to count, and which patterns to ignore.
- Foreign keys as references, and stored procedures and Agent jobs as metadata when you enable them.
Each of these is a separate switch under the extraction settings, so you can take table lineage without paying for a query-history sweep. See Lineage & Relationships.
Worth knowing
- Query lineage costs more than view lineage. It reads execution history and parses statements; start with view lineage and add it if you need to see what pipelines actually do.
- Stored procedure source code is captured as metadata when enabled, which means detectors can find credentials hard-coded inside procedures.
- The driver is bundled — there is no separate ODBC installation to manage.
Configuration
Beyond the fields below, every source also has the settings shared by all of them: the sampling strategy, the detectors to run, the scan schedule, and the compute limits for its scan jobs.
Required
Without these, the source will not save.
| Field | Type | Required | What it does | Default |
|---|---|---|---|---|
| required | object | Yes | —no extra properties | — |
| host | string | Yes | SQL Server host endpoint | localhost |
| port | integer | Yes | SQL Server TCP portmin 1, max 65535 | 1433 |
Secrets
Stored encrypted and never shown again after you save them. See Configuration & Fields.
| Field | Type | Required | What it does | Default |
|---|---|---|---|---|
| masked | object | Yes | —no extra properties | — |
| password | string | Yes | SQL Server login password | — |
| username | string | Yes | SQL Server login username | — |
Optional
Everything you can tune. Sensible defaults apply when you leave them alone.
| Field | Type | Required | What it does | Default |
|---|---|---|---|---|
| optional | object | No | —no extra properties | — |
| connection | object | No | Connection tuning for SQL Server.no extra properties | — |
| connection.auth_mode | enum | No | Authentication mode. CUSTOM uses masked.username as-is, LDAP prefixes username with ldap_domain when provided. Allowed: CUSTOM, LDAP | CUSTOM |
| connection.connect_timeout_seconds | integer | No | Connection timeout in secondsmin 1, max 120 | 10 |
| connection.is_aws_rds | boolean | No | Set true for AWS RDS SQL Server, false for on-prem. If unset, runtime auto-detects using host patterns. | — |
| connection.ldap_domain | string | No | Optional LDAP/AD domain for LDAP auth mode (for example, CORP or corp.local). | — |
| extraction | object | No | Lineage and advanced metadata extraction controls for SQL Server.no extra properties | — |
| extraction.include_jobs | boolean | No | Include SQL Server Agent jobs metadata extraction. | true |
| extraction.include_query_lineage | boolean | No | Enable query-based lineage extraction from Query Store/DMVs. | false |
| extraction.include_stored_procedures | boolean | No | Include stored procedure metadata extraction. | true |
| extraction.include_stored_procedures_code | boolean | No | Include stored procedure source code metadata when available. | true |
| extraction.include_table_lineage | boolean | No | Include table-level lineage links using foreign key metadata. | true |
| extraction.include_usage_statistics | boolean | No | Enable usage statistics extraction from SQL query metadata. | false |
| extraction.include_view_column_lineage | boolean | No | Enable view column lineage extraction when available. | true |
| extraction.include_view_lineage | boolean | No | Include view-to-table/view lineage links using SQL Server dependency metadata. | true |
| extraction.max_queries_to_extract | integer | No | Maximum number of queries to analyze for query-based lineage.min 1, max 10000 | 1000 |
| extraction.min_query_calls | integer | No | Minimum execution count for queries to be included in query-based lineage.min 1 | 1 |
| extraction.query_exclude_patterns | array | No | SQL LIKE patterns used to exclude queries from query-based lineage.max items 100 | — |
| extraction.query_exclude_patterns[] | string | No | — | — |
| scope | object | No | Database, schema, and object selection scope.no extra properties | — |
| scope.database | string | No | Single database to scan (optional when include_all_databases is true) | — |
| scope.exclude_databases | array | No | Database denylist (exact database names) | ["master","tempdb","model"] |
| scope.exclude_databases[] | string | No | — | — |
| scope.exclude_schemas | array | No | Schema denylist (exact schema names) | ["INFORMATION_SCHEMA","sys"] |
| scope.exclude_schemas[] | string | No | — | — |
| scope.include_all_databases | boolean | No | Scan all visible databases except excluded system databases | false |
| scope.include_objects | array | No | Optional object allowlist. Accepted forms: schema.object or database.schema.object | — |
| scope.include_objects[] | string | No | — | — |
| scope.include_schemas | array | No | Optional schema allowlist (exact schema names) | — |
| scope.include_schemas[] | string | No | — | — |
| scope.include_tables | boolean | No | Include table assets in extraction | true |
| scope.include_views | boolean | No | Include view assets in extraction | true |
| scope.table_limit | integer | No | Optional cap on number of table/view assets extractedmin 1 | — |