Tuesday, July 25, 2017

Generate database object scripts with mulit-platform tool mssql-scripts

In your SSMS on your computer you can use the Generate Scripts drop-down
menu to create scripts for database objects as shown here for Northwind database on SQL Server 2016 SP1.


The above is for SQL Server on Windows Platform. However, mssql-scripts tool provide the same functionality as Generate Scripts wizard on SQL Servers on Linux and macOS. Of course mssql-scripts would work on Windows as well.

Using mssql-scripts based on Python you can generate T-SQL scripts for objects on SQL Servers, Azure SQL database and Azure SQL Data Warehouse. The generated script is saved to a .sql file or on Linux can be piped to standard Unix utilities (sed, awk and grep). The scripts can be checked into source control systems as well.

The source code for mssql-scripter is found here:
https://github.com/Microsoft/sql-xplat-cli

No comments:

Post a Comment

I am not paying this invoice. I am disregarding it, becuase....

 I am not paying this invoice because MICROSOFT has not provided me with a satisfactory way to access my account since June of this year des...