Skip to main content
Solved

Model_id and branch_id are null in IAM sync file

  • September 22, 2025
  • 1 reply
  • 23 views

Forum|alt.badge.img+1

I am investigating a slow IAM sync and stumbled upon the problem below. We sync our IAM by first syncing to disk and then use the twdeployer to sync the target IAM. 

 

  1. I sync a branch to disk with the task in the SF.
  2. I open the file MODEL_SYNC.sql and copy the varbinary of sync_col for example
  3. I convert the varbinary with convert(xml, decompress( sync_data)) to take a look at the xml
  4. If i look at the xml there no nodes for model_id and branch_id in the XML (which could be logical as the sync file has been generated for a specific model and branch)
  5. However the procedure sync_col on the IAM databse expects model_id and branch_id in the XML. In the temp table model_id and branch_id are now NULL because they are not in the XML.
  6. And then in the merge
  7. So as no match can be made because model_id and branch_id are NULL all rows are inserted from the temp table and all the old rows are deleted.

Is the above correct? Or am i missing a setting that causes the model_id and branch_id not be included in the XML.

Best answer by Mark Jongeling

Hi Ling Wu,

Very well spotted! That is indeed a problem that was overlooked. The given @model_id and @branch_id in the Procedure parameters should match the ones stored in the table (col in this case)

The XML indeed does not include any model_id and branch_id due to the ability of syncing under a different name. This is a flaw on our part sadly.

It should be like this:

Revised

Could you create a ticket for this in TCP? We'll make sure to resolve this for the upcoming 2025.3 release.

Edit: Even with this flaw, all the data synchronized to IAM does arrive correctly in the tables. So nothing to worry about.

This topic has been closed for replies.

1 reply

Mark Jongeling
Administrator
Forum|alt.badge.img+23
  • Administrator
  • Answer
  • September 22, 2025

Hi Ling Wu,

Very well spotted! That is indeed a problem that was overlooked. The given @model_id and @branch_id in the Procedure parameters should match the ones stored in the table (col in this case)

The XML indeed does not include any model_id and branch_id due to the ability of syncing under a different name. This is a flaw on our part sadly.

It should be like this:

Revised

Could you create a ticket for this in TCP? We'll make sure to resolve this for the upcoming 2025.3 release.

Edit: Even with this flaw, all the data synchronized to IAM does arrive correctly in the tables. So nothing to worry about.