none
Cannot deploy metadata. Reason: The item already exists in the collection. RRS feed

  • Question

  • In an SSAS Tabular running on SQL Server 2017 on Windows 10, I receive the error "Cannot deploy metadata. Reason: The item already exists in the collection." when attempting to deploy the model to the server.  The SSAS instance was recently changed from multidimensional mode to tabular and there is currently no database on the instance.

    Here is what I have done so far to determine the cause of the error:

    - Tried with both Visual Studio SSDT 2017 and Visual Studio 2019 with SSAS extension installed.
    - Renamed the model.
    - Searched the internet for anyone who has solved or experienced a similar problem.
    - Attempted to find more data on the error to lend some clues.
    - Ensured that my Windows account has administrator role on the SSAS instance.
    - Attempted the deployment from two separate machines, including the server.

    Any ideas or advice would be very much appreciated.

    Friday, November 1, 2019 5:44 AM

All replies

  • Hi JamesC1V27,

    Please check this article and see if it helps.

    SSAS Tabular Error Fixed: Cannot Deploy Metadata. Reason: An error Occurred While Connecting to Server

    Best Regards,

    Will


    MSDN Community Support
    Please remember to click "Mark as Answer" the responses that resolved your issue, and to click "Unmark as Answer" if not. This can be beneficial to other community members reading this thread. If you have any compliments or complaints to MSDN Support, feel free to contact MSDNFSF@microsoft.com.

    Friday, November 1, 2019 7:29 AM
  • Hello Will, I have no problem connecting to the server. I am using Integrated Workspace Mode which does not require the instance name. I had already explored that link before I posted this problem.

    As I stated earlier, the problem occurs when deploying the Model. Thanks for caring.

    If I can find out where to look in the "collection" for the "item" then maybe I could edit the "collection" to remove the duplicate "item".

    Phil


    Phil


    • Edited by JamesC1V27 Friday, November 1, 2019 3:28 PM
    Friday, November 1, 2019 3:26 PM
  • Hi JamesC1V27,

    Thanks for your reply.

    Please check the content of MSMDSRV service log file and see if it exists any abnormal message.

    MSMDSRV service log file

    Or you need to clean the data files under the Data folder which is based on the property "DataDir"

    Best Regards,

    Will


    MSDN Community Support
    Please remember to click "Mark as Answer" the responses that resolved your issue, and to click "Unmark as Answer" if not. This can be beneficial to other community members reading this thread. If you have any compliments or complaints to MSDN Support, feel free to contact MSDNFSF@microsoft.com.

    Monday, November 4, 2019 6:25 AM
  • Thank you for your suggestions Will. I looked at the log and did not see anything out of the ordinary. I also deleted all the content of the data directory. Problem is not solved.

    I had also installed a new instance of SSAS Tabular on the server and still have the same problem when attempting to deploy to the new instance. It seems that the problem is on the Visual Studio side.


    Phil

    Monday, November 4, 2019 7:49 AM
  • Hi Phil,

    Thanks for your reply.

    Please try to change option "Integrated Workspace" to "Workspace server" option when you create a project and see if it has any differences.

    Best Regards,

    Will


    MSDN Community Support
    Please remember to click "Mark as Answer" the responses that resolved your issue, and to click "Unmark as Answer" if not. This can be beneficial to other community members reading this thread. If you have any compliments or complaints to MSDN Support, feel free to contact MSDNFSF@microsoft.com.

    Tuesday, November 5, 2019 9:04 AM
  • I set Integrated Workspace Mode to "False" and received the same error. "Cannot deploy metadata. Reason: The item already exists in the collection."

    Phil

    Wednesday, November 6, 2019 2:32 PM
  • I set Integrated Workspace Mode to "False" and received the same error. "Cannot deploy metadata. Reason: The item already exists in the collection."

    Phil

    OK. Thanks for your update.

    Please try to clean the files under the path /ProjectName/bin and see if it works (You'd better move them to another path) :

    Best Regards,

    Will


    MSDN Community Support
    Please remember to click "Mark as Answer" the responses that resolved your issue, and to click "Unmark as Answer" if not. This can be beneficial to other community members reading this thread. If you have any compliments or complaints to MSDN Support, feel free to contact MSDNFSF@microsoft.com.

    Monday, November 11, 2019 6:57 AM
  • Thanks for continuing to help Will. I deleted the contents of the [Project]\bin folder and received the same error. I have also upgraded from SQL Server 2017 to 2019 Developer since our last conversation. The error occurs immediately with little time to process the deployment. 

    Phil

    Monday, November 11, 2019 1:55 PM
  • Thanks for continuing to help Will. I deleted the contents of the [Project]\bin folder and received the same error. I have also upgraded from SQL Server 2017 to 2019 Developer since our last conversation. The error occurs immediately with little time to process the deployment. 

    Phil

    Hi Phil,

    If these methods are all tried, you could only change the operation system, then install SSAS instance. I have no other idea to think of if it doesn't work.

    Best Regards,

    Will


    MSDN Community Support
    Please remember to click "Mark as Answer" the responses that resolved your issue, and to click "Unmark as Answer" if not. This can be beneficial to other community members reading this thread. If you have any compliments or complaints to MSDN Support, feel free to contact MSDNFSF@microsoft.com.

    Tuesday, November 12, 2019 9:28 AM
  • Thanks for trying Will. I may have to create a formal case with Microsoft Support. Windows 10 is my OS unless I switch to Linus and I don't want to do that.


    Phil

    Tuesday, November 12, 2019 11:12 PM
  • Does this happen with multiple projects or just one in particular. Have you tried creating a completely new project from scratch and deploying that? I'm just wondering if there is maybe some object in your current project using a reserved word or something like that which is confusing SSAS.

    http://darren.gosbell.com - please mark correct answers

    Tuesday, November 12, 2019 11:42 PM
    Moderator