Sql Script Server Generator

Is there a tool that will allow me to create a single script containing all the tables and views? The Sql Publishing Wizard disables everything (so that all data is lost) and recreates it. It has the ability not to be discarded, but in this case it does not update existing tables (if any columns have been changed).

+3
source share
6 answers

In SQL Server Management Studio 2008, you can right-click the database in the object explorer, go to the "Tasks> Generate Scripts ..." section, and this will give you the opportunity to select not only the types of objects that you want to use the script, but do you want to remove the script.

+4
source

When you make changes to existing tables, you must write alter table scripts to make the changes, and then put them in the source control, like any other code. Then, when you deploy the change set, you run the scripts created for this deployment.

Otherwise, yes use SQL comparison.

+2
source

Red Gate, SQL Compare. , script. ( , , .)

+1

, , SQL-, .

, SSMS script.

SQL Server Script ( #)

+1

Look at them:
WinSQL (Lite version is free, other versions at a reasonable price + free trial)
OpenDbDiff (free)

0
source

You can also check out MyDbUtils , which can create scripts for:

  • Saved Procedures
  • Functions
  • representation
  • Triggers
0
source

Source: https://habr.com/ru/post/1779053/


All Articles