SharePoint: Impact of Duplicate Key error durring site import or Content Deployment

Article ID: 2625226 - View products that this article applies to.
Expand all | Collapse all

SUMMARY

When importing a localized site, extended SharePoint (ULS) logging may display:

Cannot insert duplicate key row in object 'dbo.Resources' with unique index 'Resources_PK'.

However, the import completes successfully. 

The same error can also be seen during a content deployment import. In this case, the content deployment job runs fine and displays no error.

MORE INFORMATION

Consider the following scenarios:

Scenario 1:

Content Deployment is used to deploy from a French Publishing Portal. The content deployment runs fine, and reports no error. However, the ImportExportLog contains a duplicate key error:

Debug: at System.Data.SqlClient.SqlConnection.OnError(SqlException exception, Boolean breakConnection)
at System.Data.SqlClient.TdsParser.ThrowExceptionAndWarning(TdsParserStateObject stateObj)
at System.Data.SqlClient.TdsParser.Run(RunBehavior runBehavior, SqlCommand cmdHandler, SqlDataReader dataStream, BulkCopySimpleResultSet bulkCopyHandler, TdsParserStateObject stateObj)
at System.Data.SqlClient.SqlCommand.FinishExecuteReader(SqlDataReader ds, RunBehavior runBehavior, String resetOptionsString)
at System.Data.SqlClient.SqlCommand.RunExecuteReaderTds(CommandBehavior cmdBehavior, RunBehavior runBehavior, Boolean returnStream, Boolean async)
at System.Data.SqlClient.SqlCommand.RunExecuteReader(CommandBehavior cmdBehavior, RunBehavior runBehavior, Boolean returnStream, String method, DbAsyncResult result)
at System.Data.SqlClient.SqlCommand.InternalExecuteNonQuery(DbAsyncResult result, String methodName, Boolean sendToPipe)
at System.Data.SqlClient.SqlCommand.ExecuteNonQuery()
at Microsoft.SharePoint.Utilities.SqlSession.ExecuteNonQuery(SqlCommand command)
at Microsoft.SharePoint.SPUserResource.AddInternal()
at Microsoft.SharePoint.Deployment.ResourceSerializer.AddUserResource(SPUserResourceCollection userResources, XmlElement resourceData, SPImportSettings settings)

ExtendedVerbose: Cannot insert duplicate key row in object 'dbo.Resources' with unique index 'Resources_PK'.

Scenario 2:

1. You create a publishing Arabic Site Collection.
2. Enable English MUI
3. Export the site (Stsadm -o export -url http://urltothesite -f package -nofilecompression -versions 3)
4. Create a null Arabic Site
5. Import the package (Stsadm -o import -url http://urltothesite2 -f package -nofilecompression)
6. The import completes successfully. However, the detailed log contains:

ExtendedVerbose: Cannot insert duplicate key row in object 'dbo.Resources' with unique index 'Resources_PK'. The statement has been terminated.
[Date and Time] Debug: at System.Data.SqlClient.SqlConnection.OnError(SqlException exception, Boolean breakConnection) at System.Data.SqlClient.TdsParser.ThrowExceptionAndWarning(TdsParserStateObject stateObj) at System.Data.SqlClient.TdsParser.Run(RunBehavior runBehavior, SqlCommand cmdHandler, SqlDataReader dataStream, BulkCopySimpleResultSet bulkCopyHandler, TdsParserStateObject stateObj) at System.Data.SqlClient.SqlCommand.FinishExecuteReader(SqlDataReader ds, RunBehavior runBehavior, String resetOptionsString) at System.Data.SqlClient.SqlCommand.RunExecuteReaderTds(CommandBehavior cmdBehavior, RunBehavior runBehavior, Boolean returnStream, Boolean async) at System.Data.SqlClient.SqlCommand.RunExecuteReader(CommandBehavior cmdBehavior, RunBehavior runBehavior, Boolean returnStream, String method, DbAsyncResult result) at System.Data.SqlClient.SqlCommand.InternalExecuteNonQuery(DbAsyncResult result, String methodName, Boolean sendToPipe) at System.Data.SqlClient.SqlCommand.ExecuteNonQuery() at Microsoft.SharePoint.Utilities.SqlSession.ExecuteNonQuery(SqlCommand command) at Microsoft.SharePoint.SPUserResource.AddInternal() at Microsoft.SharePoint.Deployment.ResourceSerializer.AddUserResource(SPUserResourceCollection userResources, XmlElement resourceData, SPImportSettings settings)

In these specific scenarios, the error message is benign. As there is no data loss, it can be safely disregarded.

Note This is a "FAST PUBLISH" article created directly from within the Microsoft support organization. The information contained herein is provided as-is in response to emerging issues. As a result of the speed in making it available, the materials may include typographical errors and may be revised at any time without notice. See Terms of Use for other considerations.

Properties

Article ID: 2625226 - Last Review: October 7, 2011 - Revision: 3.0
APPLIES TO
  • Microsoft SharePoint Foundation 2010
  • Microsoft SharePoint Server 2010
  • Microsoft SharePoint Server 2010 Service Pack 1
Keywords: 
KB2625226

Give Feedback

 

Contact us for more help

Contact us for more help
Connect with Answer Desk for expert help.
Get more support from smallbusiness.support.microsoft.com