Exproting Fatal Error: Primary Key Constraint Violation

Nov 22, 2010 at 3:48 PM

When i export my entire site with all descendents, everything work just fine.

The problem occured when I tried to export a single List. Got a PK violation error message!!

How is it that the same list get exported when entire site is selected and not by itself?

 

LOG:

-----------------------------------------------------------

[2010-11-22 11:37:40]: Start Time: 2010-11-22 11:37:40.
[2010-11-22 11:37:40]: Progress: Initializing Export.
[2010-11-22 11:37:40]: Progress: Starting Export.
[2010-11-22 11:37:40]: Progress: Calculating Objects to Export.
[2010-11-22 11:37:41]: FatalError: Violation de la contrainte PRIMARY KEY 'PK__#ExportObjects____4EFBE079'. Impossible d'insérer une clé en double dans l'objet 'dbo.#ExportObjects'.
L'instruction a été arrêtée.
   at System.Data.SqlClient.SqlConnection.OnError(SqlException exception, Boolean breakConnection)
   at System.Data.SqlClient.SqlInternalConnection.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.Deployment.SPExport.CalculateObjectDependencies(Boolean linksOnly)
   at Microsoft.SharePoint.Deployment.SPExport.FollowLinks()
   at Microsoft.SharePoint.Deployment.SPExport.CalculateObjectsToExport()
   at Microsoft.SharePoint.Deployment.SPExport.Run()
[2010-11-22 11:37:41]: Progress: Export Completed.
[2010-11-22 11:37:41]: Finish Time: 2010-11-22 11:37:41.
[2010-11-22 11:37:41]: Completed with 0 warnings.
[2010-11-22 11:37:41]: Completed with 1 errors.

Mar 11, 2011 at 2:41 PM

I also am getting a similar SQL error when trying to export an entire site from my production environment:

 

[3/11/2011 10:36:03 AM]: Start Time: 3/11/2011 10:36:03 AM.
[3/11/2011 10:36:03 AM]: Progress: Initializing Export.
[3/11/2011 10:36:03 AM]: Progress: Starting Export.
[3/11/2011 10:36:03 AM]: Progress: Calculating Objects to Export.
[3/11/2011 10:36:18 AM]: FatalError: Violation of PRIMARY KEY constraint 'PK__#ExportObjects____03B5839E'. Cannot insert duplicate key in object 'dbo.#ExportObjects'.
The statement has been terminated.
   at System.Data.SqlClient.SqlConnection.OnError(SqlException exception, Boolean breakConnection)
   at System.Data.SqlClient.SqlInternalConnection.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.Deployment.SPExport.CalculateObjectDependencies(Boolean linksOnly)
   at Microsoft.SharePoint.Deployment.SPExport.FollowLinks()
   at Microsoft.SharePoint.Deployment.SPExport.CalculateObjectsToExport()
   at Microsoft.SharePoint.Deployment.SPExport.Run()
[3/11/2011 10:36:18 AM]: Progress: Export Completed.
[3/11/2011 10:36:18 AM]: Finish Time: 3/11/2011 10:36:18 AM.
[3/11/2011 10:36:18 AM]: Completed with 0 warnings.
[3/11/2011 10:36:18 AM]: Completed with 1 errors.
[3/11/2011 10:38:18 AM]: Start Time: 3/11/2011 10:38:18 AM.
[3/11/2011 10:38:18 AM]: Progress: Initializing Export.
[3/11/2011 10:38:18 AM]: Progress: Starting Export.
[3/11/2011 10:38:18 AM]: Progress: Calculating Objects to Export.
[3/11/2011 10:38:27 AM]: FatalError: Violation of PRIMARY KEY constraint 'PK__#ExportObjects____5920F6AB'. Cannot insert duplicate key in object 'dbo.#ExportObjects'.
The statement has been terminated.
   at System.Data.SqlClient.SqlConnection.OnError(SqlException exception, Boolean breakConnection)
   at System.Data.SqlClient.SqlInternalConnection.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.Deployment.SPExport.CalculateObjectDependencies(Boolean linksOnly)
   at Microsoft.SharePoint.Deployment.SPExport.FollowLinks()
   at Microsoft.SharePoint.Deployment.SPExport.CalculateObjectsToExport()
   at Microsoft.SharePoint.Deployment.SPExport.Run()
[3/11/2011 10:38:27 AM]: Progress: Export Completed.
[3/11/2011 10:38:27 AM]: Finish Time: 3/11/2011 10:38:27 AM.
[3/11/2011 10:38:27 AM]: Completed with 0 warnings.
[3/11/2011 10:38:27 AM]: Completed with 1 errors.

Any idea what might be causing this?