Take the 2-minute tour ×
SharePoint Stack Exchange is a question and answer site for SharePoint enthusiasts. It's 100% free, no registration required.

Can I safely remove Entries in dbo.EventReceivers ?

The Problem is that when i'm deploying a Solution i get on the Feature Activation many Errors in the SharePoint Logs like:

System.Data.SqlClient.SqlException: Violation of PRIMARY KEY constraint 'EventReceivers_PK'. Cannot insert duplicate key in object 'dbo.EventReceivers'. The statement has been terminated.

But the EventReceiver i'm trying to Install is not installed before. When i'm looking in with Powershell there are no Registered EventReceivers on the List and even the List is before the deploying deleted.

I can only assume that SharePoint somehow hanged himself up at a earlier point and did not removed safely the EventReceivers from the Database.

Soo must I pay attention to anything else or can I simply remove the entries in the Database ?

share|improve this question
add comment

1 Answer 1

up vote 0 down vote accepted

It is not supported in any way to do changes in the SharePoint DB.

That being said, you seriously just have to try your luck. If there are really no attached event receivers to be found via PowerShell there also shouldn't any database references. Make a backup of the database beforehand and then try deleting the respective rows, but again: This is unsupported and might break stuff.

share|improve this answer
1  
I tried my luck and it worked ;) SharePoint seems also not be broken ;) Thx I thought that it is not a recommend way, but the DB references where there although the EventReceivers not... Don't know how that happened, but now it's fixed :) –  Mark Apr 12 '13 at 6:27
add comment

Your Answer

 
discard

By posting your answer, you agree to the privacy policy and terms of service.

Not the answer you're looking for? Browse other questions tagged or ask your own question.