I have an office on which there are major offices and branches There are different local servers and db in each branch. Master server and DB are updated by daily batch update. In such a situation, how can I overcome the ID conflict? Example: I have a record with ID 10 on the branch A, there is also a transaction with reference ID 10 (foreign key) But when saving it in the master, the DB unique ID can be changed and hence the transaction is mismatched ....
Pls help me to solve it ...
Thanks to everyone ....
backup Updated by master server and db daily updated
How can you fix your batch update or how big is your database and how many tables do you face such a problem, do not know the details of it, a general It is possible that maintain a mapping table
in your batch update logic,
-
For new records, you first of all Record the master table and then generate a new ID Insert a record with details of the mapping table, such as: branch, Shakhaaidi, Mastraidi which stores the current record, you can update the record with his Mastraidi to join and mapping table with mapping tables.
Typically, in SQL Server, if the batch update is a job, you can use SSIS and Such arguments can be made within your SSIS package.
In addition, it depends on your design but usually
source db -> staging db -> destination db
Maps which are in your case
Branch DB -> Staging DB -> Master DB
In such cases for such ATL operations, mapping tables Probably should be in the staging database, but if you do not have such designs ( which you really want ) these maps Rn tables can also stay in the destination the master database
Comments
Post a Comment