SharePoint Content Deployment & Gradual Site Delete

Consider the following scenario. You created two site collections, a source and a target. During creation of the target site collection, you choose to use the blank site template. Unfortunately, this is not sufficient anymore to get content deployment working. When the job runs, you are greeted with a whole load of errors - already at the exporting phase:

Content deployment errors

Now that’s an easy one. You might not know that the content deployment feature in SharePoint 2010 needs a target site created without a specific template.

All right, let’s delete this site collection and create one again. Be sure to specify “ < Select template later … >” upon creation of the site collection like this:

Select a template

Let’s run that content deployment job again…

It just got worse


Another error

The error itself is pretty clear: “There is already an object with the Id in the database from another site collection”. But we just deleted the site collection? And that’s exactly the problem.

Gradual Site Delete

In the past the system deleted site collections in one big operation, often resulting in performance disasters on production systems - Bill Baer has the details on this issue. When you delete a site collection now, there is a timer job that does the work for you. By default, it is scheduled to run once a day. Just run it manually and the content deployment errors will go away. It will delete the leftovers from your old site collection immediately, including the conflicting object id’s. Go to System Settings > Timer Job Definitions and select the “Gradual Site Delete” timer job for the target web application. Just click the “Run Now” button to get it going.

Run Now

After the timer job has run, try your content deployment job again and all is good.

Time job ran successfully

One of the requirements of content deployment is that both source and target site collections have to be in different content databases at a minimum. Now you know why: to avoid having duplicate object IDs.