SQL: Scripting SQL Server objects and data from the command line
The other day I posted a shortcut article about how to use SQL Server Management Studio (SSMS) to generate INSERT statements for data.
In one of the comments, a reader asked if there was a way to do that from the command line.
The answer is yes. Apart from a variety of 3rd party tools, a few years back, Microsoft released tools to do just that.
The easiest tool is probably mssql-scripter and you’ll find an intro to it here:
2026-11-04

