I recently came across the following error message when I tried to look at the batches in the Integration Management section of MDS:

515: A database error has occurred. Please contact your system administrator

koen_mdserror

Too bad I am the system administrator on that machine…

Anyway, after some searching it came out the MDS stored procedure udpEntityStagingAllBatchesByModelGet throws a bit of a temper tantrum if one of the batch tags used in the staging process of a leaf member is NULL. You can check this in the table mdm.tblStgBatch.

Simple delete the offending batches and you’re good to go!

T-SQL
1
2
DELETE FROM mdm.tblStgBatch
WHERE BatchTag IS NULL;
DELETE FROM mdm.tblStgBatch
WHERE BatchTag IS NULL;