After applying Service Pack 1 to a SQL Server 2012 instance my Master Data Services Model became corrupt.
When trying to validate the model, I got an Invalid Column: uda_nn_nn error message.
Needless to say that this column didn’t exist in the current model. I checked in the last backup of the database and it didn’t exist in that model either.
I’m not sure what caused it but this was how I solved it:
- Export the model using MDSModelDeploy.exe
- MDSModelDeploy createpackage -model “MyModel” -version “Version 3” -service “MDS1” -package “c:\MyPackage.pkg” -includedata
- Delete the problematic model from within the MDS UI.
- Deploy the exported model using the deploynew clause:
- MDSModelDeploy.exe deploynew -package “c:\MyPackage.pkg” -model “MyModel” -service MDS1
It seems that just deploying a new model (which in contrast to the deploy clone option) creates new internal object names (i.e. new attributes etc). And this sorts out the metadata corruption.