1

I have a database that has been updated, many columns have been added. Currently the only way of returning the differences between the two databases is by going through the database.cs class that is autogenerated and comparing it with the old database.cs file. I have both database on Sql Server Management Studio (the new structure, and the old structure of the databsae) and want to see all the differences. How can I return the differences between the databases and tables.

E.g.

OLD Db  New Db
TabA    TabA
Col1    Col1
Col2    Col2
Col3    Col3
        Col4

Output
Col4 int not null
4

1 Answer 1

3

You can use the applications listed in comments, or use SQL Server Data Tools. What I like about SSDT is it is a native SQL Server development environment, works well with source control, and has a really good set of features for database development.

You should be able to install from your SQL Server 2014 media or just download it. You can then use Schema Compare between database projects or deployed databases. In the example image I have compared two dev servers, and after selecting a Procedure that has a detected difference, I can inspect what has changed. You can script out the update and inspect or edit it or simply push the change to the target server. You could also import either into a database project and put it under source control.

enter image description here

0

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service, privacy policy and cookie policy

Not the answer you're looking for? Browse other questions tagged or ask your own question.