Azure SQL DB: Generate scripts by using mssql-scripter

2017年7月19日

You can now use mssql-scripter, an open-source command-line interface, to generate database scripts. Mssql-scripter is a multi-OS command-line equivalent of the widely used Generate and Publish Scripts Wizard experience in SQL Server Management Studio.

You can use mssql-scripter on Linux, macOS, and Windows to generate data definition language (DDL) and data manipulation language (DML) T-SQL scripts for database objects in SQL Server (running anywhere), Azure SQL Database, and Azure SQL Data Warehouse. You can save the generated T-SQL script to a .sql file or pipe it to standard *nix tools (for example, sed, awk, grep) for further transformations. You can edit the generated script or check it into source control. Then, you can execute the script in your existing SQL Database or SQL Data Warehouse deployment processes and DevOps pipelines with standard multiplatform SQL command-line tools such as sqlcmd.

Mssql-scripter is built using Python and incorporates the usability principles of the new Azure CLI 2.0 tools. The source code is on GitHub, and we welcome your contributions and pull requests. An installation and quick start guide is available.

免费帐户

了解并使用 $200 信用额度构建,继续免费使用

免费开始

Visual Studio

订阅者每年可获得高达 $1800 的 Azure 服务

立即激活

初创企业

加入 BizSpark 计划并获得免费的 Azure 服务

了解更多