I am generating table, view, stored procedure scripts from SQL Server Management Studio 2012.
The options that are set to true are
The objects are being generated in alphabetical order. Is there a way for me to generate the scripts in order of relation, so that when I run the scripts one by one, I will not have key missing errors or object missing errors?
In simple words, I want the scripts to be generated in dependency order, rather than alphabetical order. Is there a way to do it using SQL Server Management Studio 2012.
You can choose to script the entire database by doing the following.
This should script all your tables into one script in dependency order.
If that still hasn't worked then I suggest you simply reorder your script.
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.