Disable Event handlers during Content Deployment (Sharepoint 2007/MOSS)

Disable Event handlers during Content Deployment (Sharepoint 2007/MOSS)When we are doing a content deployment in a publishing site and there are lot of event handlers attached to list/libraries then be aware that by default content deployment tells PRIME not to fire events during import. You can change this setting, but beware that you’ll see a performance hit (and a small additional one for the actual event handler code you run).


So how do you do it?



Possible Values: 0 = No, 1 = Yes, Default Value: No.

This property allows you to control whether event receivers are allowed to fire during the import or not. The default is that event receivers are disabled during import. This configures the SPImportSettings.SuppressAfterEvents setting for the remote import job.

To modify this option please use the following STSADM command:

STSADM -o editcontentdeploymentpath -pathname <pathname> -enableeventreceivers yes | no


 Note: In case if you get an error while running the STSADM command that looks like: Failed to update the content deployment path with name................................... Just make sure that you are running the command with proper privileges (one hack just run this command with the same app-pool account as the Central admin, but yes if you run it with a proper privileged account that should not be a problem).


Another important thing that I have observed is we restart the OWSTIMER service then we need to run the STSAM -o editContentDeploymentPath command to enable or disable the eventhandlers again.

Comments (1)
  1. JW says:

    thank you for the notes on this blog!  Saved me tons of time by a simple service restart.

Comments are closed.

Skip to main content