Options
Syncing table and related data
ids
Posts: 2
I am trialing SQL Data Compare to solve the issue of copying / syncing data from a production database to a training environment.
I don't want to copy all the data but instead a selected snapshot - the last weeks data.
The main table I want to copy has a date on it so I can easily filter the rows I want from that using a WHERE clause. However linked to the main table is a number of other tables that I can't use the same restriction on.
Is there anyway to have the data synchronization copy a row from a table and then all dependent rows from related tables?
I don't want to copy all the data but instead a selected snapshot - the last weeks data.
The main table I want to copy has a date on it so I can easily filter the rows I want from that using a WHERE clause. However linked to the main table is a number of other tables that I can't use the same restriction on.
Is there anyway to have the data synchronization copy a row from a table and then all dependent rows from related tables?
Comments
If the table has dependency can it not use the same clause? Do these table have Foreign key relationship?
Product Support
Redgate Software Ltd.
E-mail: support@red-gate.com
If table A has a foreign key relationship to table B, is there a way to automatically include those records?
(Data compare will fail at the end of the deployment, quoting the foreign key relationship as the reason for failure.)
It would be cool if the Deployment Options had a toggle to exclude orphaned data or include only related data so all those rows without a parent don't get moved.