I'm trying to recreate an Azure SQL database in Azure Synapse. To this end I use SSMS to generate the various create tables script, then use the "Azure Synapse Pathways" tool to convert that script to a Synapse compatible script, but this unfortunately results in many errors and the resultant scripts are unusable. The errors are many and varied, but for example:
TEXTIMAGE ON not supported CLUSTERED PRIMARY KEY not supported CHECK constraint not supported FOREIGN KEY not supported
Is there a way to generate DDL file, such that Azure Synapse Pathway has a better chance of converting the script?
I have done this recently and used Visual Studio Database projects to aid the conversion. Do the following steps in Visual Studio 2019:
Import the database to the project. Follow the instructions from here
Fix any errors that are reported
Change the target platform to 'Microsoft Azure SQL Data Warehouse'
Fix any errors that are reported. Dedicated SQL pools only supports NONCLUSTERED
and NOT ENFORCED
primary keys for example
Publish your project to the target Synapse server
I ended up re-importing the database to a new database project for a 'clean' schema. YMMV
You can also script out SQL from SQL Server Management Studio (SSMS) in a dedicate SQL pool format or look at command-line tools like mssql-scripter and mssql-cli command line. Pathway is in preview and I just had too many issues with it.
The technical post webpages of this site follow the CC BY-SA 4.0 protocol. If you need to reprint, please indicate the site URL or the original address.Any question please contact:yoyou2525@163.com.