locked
MDSModelDeploy "The name already exists" ERROR MDS 2016 RRS feed

  • Question

  • Hi,

    Do you guys have the cure for this sort of error?

    C:\Program Files\Microsoft SQL Server\130\Master Data Services\Configuration>

    MDSModelDeploy deployupdate -service MDS1 -package MDS_0112.pkg Deploying package MDS_0112.pkg, updating model Mod MDSModelDeploy operation failed. Elapsed time: 00:00:11.0082811 Error: The model cannot be updated. 110003: The name already exists. Type a different name. Correlation Id: 402c8fc7-5f78-4cc9-9eda-e2f21a40706d Package deployment failed with 1 errors The name already exists. Type a different name.


    I already tried to delete all of subscription views and business rules on both sides (dev - test).

    I have done this deployupdate process quite a few times and it has succeeded always in the past..

    Any ideas?

    Thanks in advance!

    Monday, December 5, 2016 12:27 PM

All replies

  • I am getting the same error today.
    Wednesday, December 7, 2016 8:01 PM
  • Hi,

    Sorry to hear. If you find solution, please let me know!

    Thursday, December 8, 2016 7:58 AM
  • Any suggestions for MSShark?

    Thanks!


    Ed Price, Azure Development Customer Program Manager (Blog, Small Basic, Wiki Ninjas, Wiki)

    Answer an interesting question? Create a wiki article about it!

    Monday, December 19, 2016 9:36 AM
  • MSShark, have you made any progress with this issue?

    Thanks!


    Ed Price, Azure Development Customer Program Manager (Blog, Small Basic, Wiki Ninjas, Wiki)

    Answer an interesting question? Create a wiki article about it!

    Tuesday, January 3, 2017 10:44 PM
  • check following command to check list of services.run following query.

    MDSModelDeploy listservices
    Deploynew  -->Create a new model by deploying a package
    Deployupdate --->Update a model version by deploying a package

    try with Deploynew.


    Please Mark it as Answered if it answered your question OR mark it as Helpful if it help you to solve your problem.

    Wednesday, January 4, 2017 7:57 AM
    Answerer
  • I have two services running simultaneously. One for dev, one for test.

    I don't want to deploy new as I'm trying to update existing model.

    I managed to do workaround by extracting dev model, deploying that to my own virtual machine, taking an extract again and updating test with that model.

    This is not an answer but has to do until someone fixes that or proposes something more cleaver.

    Wednesday, January 4, 2017 8:19 AM
  • We are having the same problem.

    Just to be clear, when you deploy the model to your virtual machine, do you use deployclone or deploynew at this point?

    Any idea why your workaround works?-)

    Wednesday, February 1, 2017 9:00 AM
  • Thanks for reporting this . let me try to repro this first and I will open a defect in our tool if it is a bug.

    from people who reported this, can this be easily repro-ed from sample model database MDS 2016 provides ? if not please help us with some sample model packages . really appreciate some one help here

    sunny

    Wednesday, February 15, 2017 12:14 PM
  • Hi,

    Unfortunately not Raitila. I used deployclone.


    • Edited by MSShark Thursday, February 16, 2017 6:05 AM
    Wednesday, February 15, 2017 12:39 PM
  • Hi,

    I'll have to try to reproduce this myself but I don't think there is any reason why it couldn't be done with sample.

    Wednesday, February 15, 2017 12:43 PM
  • Hi Msshark,

    it would be great if you can try to reproduce this and provide with the easy way to reproduce this with sample data .

    I was not able to reproduce this .

    sunny

    Wednesday, February 22, 2017 6:25 AM
  • Hi Msshark,

    it would be great if you can try to reproduce this and provide with the easy way to reproduce this with sample data .

    I was not able to reproduce this .

    sunny

    I was able to repro this error even though it wasn't caused by same reason as in original case. Changing column type from domain based to text in test using Excel Add-in and deploying that change into production results same error message. This couldn't be solved deploying model to third environment in the middle. Repro was done using Product sample model and one of product tables domain based columns.

    Hope you can use this to find the root problem.

    Br, Shark

    Wednesday, March 15, 2017 4:49 PM
  • Hi Shark,

    let me rephrase so that I am on same page with you . so modify the attributes in an entity and try to use the same name as previous for deploying should repro this error right ?  confirm that on your production you already have the same entity with DBA attribute deployed on it earlier ?

    which command did you use ? DeployUpdate ?

    thanks,

    sunny

    Tuesday, March 21, 2017 8:17 AM
  • So,

    1. Exactly same model in test and production (production created by deployclone)
    2. Modify column, for example Product.ProductLine, as change this domain based column to text column in Excel add-in using Change attribute properties https://msdn.microsoft.com/en-us/library/ff487008.aspx?f=255&MSPPError=-2147217396
    3. Use deployupdate function to update model in production

    Br, Shark

    Tuesday, March 21, 2017 8:56 AM
  • Hi Shark,

    let me rephrase so that I am on same page with you . so modify the attributes in an entity and try to use the same name as previous for deploying should repro this error right ?  confirm that on your production you already have the same entity with DBA attribute deployed on it earlier ?

    which command did you use ? DeployUpdate ?

    thanks,

    sunny

    Hi Sunny!

    We are struggling here. Same error again and now workaround using VM in middle doesn't work.

    Has anyone found answer for this? How is repro doing?

    Br, Shark

    Tuesday, April 18, 2017 11:23 AM
  • hi @MSShark ,

    could you try this quick workaround and let me know If this issue is resolved or not .

    I remember business rule migration was causing this issue as I heard from one customer . can you remove them by using the model package editor and try migrating it again ?

    I will await for your reply .

    thanks,

    sunny

    Wednesday, July 5, 2017 5:06 AM
  • Hi @Smartysanthosh,

    I have tested what you suggested but still getting the same issue as everyone else.

    Regards

    Friday, October 13, 2017 10:33 AM
  • Hi @Smartysanthosh,

    I have tested what you suggested but still getting the same issue as everyone else.

    Regards

    Hi,

    @Sunny, sorry I missed your proposal but that wasn't the reason or solution in this case. After way too long debugging session I found out real cause for at least my case.

    MDSModelDeploy tool won't process attributes with same names and different MUIDs. If you have, as I explained before, changed attribute type or basically just dropped and recreated attribute with same name, MUID is changed and problem rises. 

    Querying target and source environment tblAttribute table with same attribute name and entity id will show difference in MUID.

    TargetMUID				SourceMUID
    D1A2EE9E-B91B-42B5-80BC-D55B5571A476     8C71C145-2878-42B1-85F4-6BE6B47F79FA
    
    UPDATE MDS.mdm.tblAttribute
    SET MUID = '8C71C145-2878-42B1-85F4-6BE6B47F79FA'
    WHERE MUID = 'D1A2EE9E-B91B-42B5-80BC-D55B5571A476'

    After manually updating MUID in one of the environments all works as expected.

    I don't know though does this happen also if you drop and recreate business rules.

    Hopefully this helps!

    -Shark


    • Edited by MSShark Friday, October 13, 2017 11:29 AM
    Friday, October 13, 2017 11:10 AM
  • I'm experiencing the same issue in MDS 2017. 

    In my case, I  had changed a field in my entity from text to a constrained lookup in the dev environment. The same field name in the same entity already existed in the QA environment (which I used deployclone for deployment to QA). 

    As noted in posts above, changing from text to constrained lookup causes the attribute MUID to change and so is no longer the same as the target field in QA.

    The only way to resolve this was to set the MUID in QA for the target attribute to be the same as the new MUID in the dev environment.


    Friday, December 15, 2017 7:23 PM
  • I have the same error, but I don't know how to find the register that raise the error.

    This is an extraction of the log:

    DECLARE @DerivedHierarchyLevels mdm.DerivedHierarchyLevel;
    INSERT INTO @DerivedHierarchyLevels (Model_MUID, ModelName, DerivedHierarchy_MUID, DerivedHierarchyName, MUID, Name, ForeignEntity_MUID, ForeignEntityName, Foreign_MUID, ForeignName, ForeignType_ID, ManyToManyChildAttribute_MUID, ManyToManyChildAttributeName, DisplayName, IsVisible, LevelNumber)
    VALUES
        (N'f8656b19-0d76-4845-8400-853d962a4438', N'Data', N'071a815d-60a9-4fac-ab97-585edb942234', N'Regions', N'662c86e7-6509-424e-bc10-f75b75c27740', N'CountryCode', N'68b509b4-da1e-4c7b-bcef-180561eb7772', N'MD_RegionsCodes', N'4581c6cf-29a5-44ed-8a2e-6c20fc96bb14', N'CountryCode', 1, NULL, NULL, N'CountryCode', True, 1),
        (N'f8656b19-0d76-4845-8400-853d962a4438', N'Data', N'071a815d-60a9-4fac-ab97-585edb942234"
    05/07/2018 13:26:54,a4cd1352-815c-4c57-b511-b0c60ab5dec5,DoMetadataClone,Error,"Failed to execute database operation server SQL2016SIPTEST\SPEIIPRE, database SPEII_MDS. Error: System.Data.SqlClient.SqlException (0x80131904): MDSERR110003|The name already exists. Type a different name., @ErrorNumber = 50000, @ErrorProcedure = ""udpAttributeSave"", line 470
       at System.Data.SqlClient.SqlConnection.OnError(SqlException exception, Boolean breakConnection, Action`1 wrapCloseInAction)
       at System.Data.SqlClient.TdsParser.ThrowExceptionAndWarning(TdsParserStateObject stateObj, Boolean callerHasConnectionLock, Boolean asyncClose)
       at System.Data.SqlClient.TdsParser.TryRun(RunBehavior runBehavior, SqlCommand cmdHandler, SqlDataReader dataStream, BulkCopySimpleResultSet bulkCopyHandler, TdsParserStateObject stateObj, Boolean& dataReady)..

    ...

    SQL Error Debug Info: Number: 50000, Message: MDSERR110003|The name already exists. Type a different name., @ErrorNumber = 50000, @ErrorProcedure = ""udpAttributeSave"", line 470, Server: SQL2016SIPTEST\SPEIIPRE, Proc: udpMetadataSave, Line: 2062
    "
    05/07/2018 13:26:55,00000000-0000-0000-0000-000000000000,Unknown,Error,"Deployment: Failed attempting to deploy a package (updating a model). 110003: The name already exists. Type a different name.
    Correlation Id: a4cd1352-815c-4c57-b511-b0c60ab5dec5
    "

    It seems to fail with derived hierarchies, but I've reviewed source and target on all members of mdm.tblDerivedHierarchydetail and they have the same MUID's

    At normal attributes don't find any different MUID's.

    Do you know how to find exactly which is the register/object that cause the error?

    Could be using the CorrelationId? Can I locate this correlationId at the MDS database?

    Thanks in advance,

    Monday, May 7, 2018 12:08 PM
  • Hi.

    Is this issue resolved ? Is there any workaround available ?

    Tuesday, January 21, 2020 5:51 AM