Schema update using SQL Server Data Tools
-
Hi All, I have two different databases on two different servers I compared the source database with destination database, there are few things like a Foreign key doesn't exist in the target database, a couple of columns are missing. Now after finding it, I want to update the schema from Source database to Destination database without losing the data on the target database. When I ran it, it is giving me error and saying Target database may loose data, can anybody please help me or point me, how can I achieve this? Any suggestion, link or code snippet can be very helpful. Thanks in advance.
Thanks, Abdul Aleem "There is already enough hatred in the world lets spread love, compassion and affection."
-
Hi All, I have two different databases on two different servers I compared the source database with destination database, there are few things like a Foreign key doesn't exist in the target database, a couple of columns are missing. Now after finding it, I want to update the schema from Source database to Destination database without losing the data on the target database. When I ran it, it is giving me error and saying Target database may loose data, can anybody please help me or point me, how can I achieve this? Any suggestion, link or code snippet can be very helpful. Thanks in advance.
Thanks, Abdul Aleem "There is already enough hatred in the world lets spread love, compassion and affection."
If you are changing column formats or shortening the length of a field you will often get this message. You need to asses whether the changes are actually going to impact your database eg shortening a varchar from 1000 to 500 is not relevant if the longest string is only 100 in length. Whereas changing a data format from decimal to int may make a critical difference!
Never underestimate the power of human stupidity RAH
-
If you are changing column formats or shortening the length of a field you will often get this message. You need to asses whether the changes are actually going to impact your database eg shortening a varchar from 1000 to 500 is not relevant if the longest string is only 100 in length. Whereas changing a data format from decimal to int may make a critical difference!
Never underestimate the power of human stupidity RAH
No I am just adding a Foreign key constraint still it errors it out, because in the new database we have added Foreign Key constraint that we want to sync it to the old database without losing the data. Another place it is erroring out is at a View which is referencing tables from other databases and other servers as well. Any idea how to resolve these things?
Thanks, Abdul Aleem "There is already enough hatred in the world lets spread love, compassion and affection."