Buy me an espresso

April 18, 2008

Content Deployment ... Violation of PRIMARY KEY constraint ...

UPDATE
Hotfix 950279 is available via contacting MS Support. After some "wrangling" ... this worked for us.

Overview

If you have just ran an "all content" deployment successfully ... don't start celebrating yet. Sure, it may have taken over a week with a hotfix or two to get it working. Just keep in mind that you will most likely want to setup deployment on a schedule for "only new, changed" content. That process turns out to be just as fun.

Issue

The first attempt at running a "only new, changed" content deployment (after a successful "all content" deploy) ended quickly with the following error:

Violation of PRIMARY KEY constraint 'PK__#ExportObjects____2F364608'. Cannot insert duplicate key in object 'dbo.#ExportObjects'. The statement has been terminated. at ...

Solution for pre-SP1 installations

Hotfix 936867 will fix this issue IF YOU HAVE NOT INSTALLED (the SP1s).

No Solution Yet for SP1 ...

If you have installed the SP1s, there is a much more drawn out solution. If you have previously installed 936867 and you install SP1 after ... your error will most likely return. Microsoft claims in their description of the MOSS SP1 ("2007 Microsoft Office servers Service Pack 1") that 936867 is included in the SP ... and this is it one of the "Issues that the service pack fixes" ... um LIE!

Great discussion about this issue here on MS's SharePoint forum.

2 comments:

Anonymous said...

Did this hotfix fix the problem with the Violation of PRIMARY KEY constraint 'PK__#ExportObjects??

Richter said...

Yes it did!

http://support.microsoft.com/kb/950279