Reputation: 558
How does one dump/export the DDL at the schema-level on Microsoft's Azure SQL Data Warehouse?
Upvotes: 5
Views: 3922
Reputation: 405
You should try Mssql-scripter.
Mssql-scripter is the multiplatform command-line equivalent of the widely used Generate 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.
Upvotes: 0
Reputation: 153
Are you still experiencing this issue? Please make sure you have selected the correct database engine type and edition within SSMS to generate scripts.
Follow these instructions:
Use SSMS (Right Click on database name/Generate Scripts/Next/select “Select specific database objects”/Click on Tables and Views/Click Next/Click on Advanced/Scroll down and look for “Script for the database engine type/Select “Microsoft Azure SQL Database”/
For option “Script for the database engine edition”/Select “Microsoft Azure SQL Data Warehouse”/OK/Change location and file name then select Next/Next
Upvotes: 3