Reputation: 1
We have two different databases of SQL Server, called DB1
and DB2
. I want to synchronize tables, views and stored procedures of these two databases. Let me clarify, I am not asking for a data sync - what I want is to only sync the structure of the two databases.
Thanks in advance, regards.
Upvotes: 0
Views: 1995
Reputation: 88852
What you are asking for is called "Schema Compare", and there are several tools that can do this for you, including the free SQL Server Data Tools, available for download here.
Views and stored procedures can simply be scripted from one database and applied to the other, but for tables you need to calculate the differences between the existing and new table and generate a script to apply the changes without loosing the data currently in the target tables.
Upvotes: 2