marmotdata/mssql
Discover databases, tables, views and routines from Microsoft SQL Server instances
The SQL Server plugin discovers databases, tables, views, stored procedures and functions from Microsoft SQL Server, Azure SQL Database and Azure SQL Edge instances.
It uses the pure-Go github.com/microsoft/go-mssqldb driver, so it needs no cgo and no ODBC driver on the host. SQL authentication works with a plain login, and Windows authentication works by giving the login as DOMAIN\user.
Databases
A SQL Server session is bound to a single database, so the plugin opens one connection per database. By default it discovers every database the login can open, minus master, model, msdb and tempdb. Set database to discover just one.
Because one instance holds many databases and two of them can hold the same schema and object name, tables, views and routines are identified in their MRN by database.schema.object, while the asset name is the object's own name. Set zone to a short name such as prod-eu when you run two servers of the same kind, and it becomes part of every MRN. The name is one you choose, not a cloud availability zone.
Encryption
encrypt: true requires an encrypted connection. A default SQL Server install presents a self-signed certificate, which fails verification, so pair it with trust_server_certificate: true or install a certificate the client trusts. encrypt: false turns encryption off entirely.
Comments
SQL Server has no COMMENT ON, so descriptions come from MS_Description extended properties on schemas, tables, views and columns. Objects without one have no description.
Query history
Query history is not read. Usage-based lineage would need the plan cache or Query Store, which are per-database, expensive to scan and often disabled. Lineage comes from foreign keys and view definitions instead.
In the UI
Point and click, no config file needed.
- Open Runs and choose Create pipeline.
- Pick Microsoft SQL Server from the plugin list.
- Fill in the settings, set a schedule and save.
With the CLI
Save a YAML config, then run marmot ingest.
Not using plugins? Other ways to populate Marmot
Configuration
Fields marked Required must be set.
tagsList of textTags to apply to discovered assets
external_linksList of groupsExternal links to show on all assets
nameTextDisplay name for the link
iconTextIcon identifier for the link
urlTextURL to the external resource
filterGroup of settingsFilter discovered assets by name (regex)
includeList of textInclude patterns for resource names (regex)
excludeList of textExclude patterns for resource names (regex)
zoneTextTells this system apart from others of the same technology and becomes part of every asset's MRN
hostText RequiredSQL Server hostname or IP address
portNumberSQL Server port
userText RequiredLogin to authenticate with. Use DOMAIN\user for Windows authentication
passwordSecret RequiredPassword for the login
databaseTextDiscover only this database. Leave empty to discover every database the login can open
exclude_databasesList of textDatabases to skip
exclude_schemasList of textSchemas to skip
encryptYes or noRequire an encrypted connection
trust_server_certificateYes or noAccept the server certificate without verifying it. Needed for self-signed certificates
connect_timeout_secondsNumberSeconds to wait for a connection
application_intentOne ofConnect to a read-only replica with ReadOnly
include_columnsYes or noWhether to include column information
include_viewsYes or noWhether to discover views
include_proceduresYes or noWhether to discover stored procedures and functions
discover_foreign_keysYes or noWhether to discover foreign key relationships
include_statisticsYes or noWhether to collect row counts and table sizes
Assets emitted
Metadata this plugin attaches to each discovered asset.
Database
The metadata fields the SQL Server plugin emits for database assets.
Table
The metadata fields emitted for table and view assets.
Function
The metadata fields emitted for stored procedure and function assets.
Column
The per-column fields embedded in an asset's schema.