none
export-spweb : "these columns don't currently have unique values" but please no old answers!

    Question

  • Hi!

    I set up the following configuration for one of my clients:

    content type hub = site collection A

    model site  collection B

    model site  collection C = model site  collection B backup and restore as C

    Export-SPWeb of B root site : ok (it seems no contet type exported)

    Export-SPWeb of B sub site : ok

    Export-SPWeb of site collection C sub site = ok

    Export-SPWeb of site collection C rootweb = ko with the famous error "these columns don't currently have unique values". The error is indicated when exporting content types.

    Why? Has anybody resolved that? Even after removing all specific content types from C root site, export-spweb fails.

    It would be nice also if Microsoft error messges could be more precise (which column in the content database, or which content type causes the problem). 

    Any idea please? It is very important as my client cannot save root webs. But please do not tell me to use stsadm...



    Sunday, March 05, 2017 10:18 AM

Answers

All replies

  • Hi Damien_Brarfort,

    Are the Site Collection B and Site Collection C (copy of Site Collection B) in the same database?

    If they are in the same database, please move Site Collection C to a new database. Then export Site Collection C using export-spweb command, it should work.

    Best regards,

    Linda Zhang


    Please remember to mark the replies as answers if they help.
    If you have feedback for TechNet Subscriber Support, contact tnmff@microsoft.com

    Monday, March 06, 2017 7:52 AM
    Moderator
  • Hi!

    Thank you very much for your answer. It was the last test we were going to perform. I will give you the results.

    So, it means that it should be impossible to restore the same site collection twice in the same content database?

    Sincerely yours,

    Damien

    Monday, March 06, 2017 8:20 AM
  • Ok, so you were right. If the same site collection is restored twice in the same content database it fails. Why do Export-SPWeb perfoms such operations? Is seems it tries to create a unique index in the database table; an export should not modify the database structure... Even then, the unique key should include the siteId in it.

    Annoying. We have to propose our customer other ways. It should be nice from Microsoft to document what it is impossible to do; and then, give advices on how to structure a SharePoint for the different needs.

    Monday, March 06, 2017 12:55 PM
  • Hi Damien_Brarfort,

    The December 13 2016 CU fixes the “Export-SPWeb” issue. Please try installing it and then check if the issue is resolved.

    Here is the download link:

    https://support.microsoft.com/en-us/kb/3128005

    Best regards,

    Linda Zhang


    Please remember to mark the replies as answers if they help.
    If you have feedback for TechNet Subscriber Support, contact tnmff@microsoft.com

    Wednesday, March 08, 2017 1:43 AM
    Moderator
  • Great! Thanks again! I give that information to my admin.
    Thursday, March 09, 2017 8:44 AM