Internally, my company utilises MS SQl 7.0, but external customers receive a database copy shipped in full periodically in SQLBase, SQLServer (7 or 2000) or (potentially) Oracle.
We need to simplify things, and cut costs, so we want to ship the changes only (new/updated/deleted records). PKs exist on all tables as do datetimes of amendment/creation.
I'm toying with the following..........
Create a trigger on each table which logs the deleted PK, and the time of deletion when a record is deleted. All deletions since date X can then be recreated for application on the external machines.
As there is a datetime field called Updated on each table, Amends/Inserts can be found by simply selecting where Updated > date X.
For application on the customer machines, run the delete script first, then the insert/updates.
Its plausible and easy, but have I missed anything out? Is there a better way? MS Replication is NOT an option here.
Just looking for reassurance I guess!
We need to simplify things, and cut costs, so we want to ship the changes only (new/updated/deleted records). PKs exist on all tables as do datetimes of amendment/creation.
I'm toying with the following..........
Create a trigger on each table which logs the deleted PK, and the time of deletion when a record is deleted. All deletions since date X can then be recreated for application on the external machines.
As there is a datetime field called Updated on each table, Amends/Inserts can be found by simply selecting where Updated > date X.
For application on the customer machines, run the delete script first, then the insert/updates.
Its plausible and easy, but have I missed anything out? Is there a better way? MS Replication is NOT an option here.
Just looking for reassurance I guess!