Tuesday, May 1, 2012

Event ID: 5553 and 7888


In Application logs in the SharePoint server, we may continuously find 2 different events occurring frequently.

//-----------------------------------------------------------------
Event Type: Error
Event Source: Office SharePoint Server
Event Category: User Profiles
Event ID: 5553
Date: 4/26/2012
Time: 7:09:02 PM
User: N/A
Computer: SERVER NAME
Description:
failure trying to synch site a7b12d90-7d1d-4341-8df3-a1d92eba7a47 for ContentDB db7fb0d6-7d0d-4230-8de5-e7cc00ca0db7 WebApp 55de867d-5a9d-4ac4-83d6-f3ee9ee98df2. Exception message was Cannot insert duplicate key row in object 'dbo.UserMemberships' with unique index 'CX_UserMemberships_RecordId_MemberGroupId_SID'.
The statement has been terminated..
For more information, see Help and Support Center at http://go.microsoft.com/fwlink/events.asp.

//----------------------------------------------------------------
Event Type: Error
Event Source: Office SharePoint Server
Event Category: Office Server General
Event ID: 7888
Date: 4/26/2012
Time: 7:09:02 PM
User: N/A
Computer: SERVER NAME
Description:
A runtime exception was detected. Details follow.
Message: Cannot insert duplicate key row in object 'dbo.UserMemberships' with unique index 'CX_UserMemberships_RecordId_MemberGroupId_SID'.
The statement has been terminated.
Techinal Details:
System.Data.SqlClient.SqlException: Cannot insert duplicate key row in object 'dbo.UserMemberships' with unique index 'CX_UserMemberships_RecordId_MemberGroupId_SID'.
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.Office.Server.Data.SqlSession.ExecuteNonQuery (SqlCommand command)
at Microsoft.Office.Server.UserProfiles.WSSSynchSqlSession.SynchExecuteNonQuery (SqlCommand cmd, Boolean throwOnFail)
at Microsoft.Office.Server.UserProfiles.WSSSynchSqlSession.SynchExecuteNonQuery (SqlCommand cmd)
at Microsoft.Office.Server.UserProfiles.SiteSynchronizer.WriteChangeLogConsumed()
at Microsoft.Office.Server.UserProfiles.SiteSynchronizer.Synch()
at Microsoft.Office.Server.Diagnostics.FirstChanceHandler.ExceptionFilter (Boolean fRethrowException, TryBlock tryBlock, FilterBlock filter, CatchBlock catchBlock, FinallyBlock finallyBlock)
For more information, see Help and Support Center at http://go.microsoft.com/fwlink/events.asp.
//-----------------------------------------


Cause:
The likely reason for this issue is the content database which can be movied or copied or used without detaching properly.
As the synchronization runs every hour, this issue will appear frequently in the event viewer.

Resolution:
We have to track down which content db is giving the issue.
For that you can run the following queries in the config db to find out the contentdb 


SELECT *FROM [dbo].[Objects]

WHERE ID='db7fb0d6-7d0d-4230-8de5-e7cc00ca0db7'

The GUID of the content db can be obtained from the error message itself, (5553 error)

SELECT [FullUrl]
,[Id]
,[RootWebId]
FROM [WSS_Content_sitecontentdb].[dbo].[Sites]
WHERE ID='a7b12d90-7d1d-4341-8df3-a1d92eba7a47'


The site GUId also can be obtained from the error message. Which is used to execute the below command
The following command is to be executed to clear the errors.
stsadm -o preparetomove -Site "http://<sitename>/" -OldContentDB "<ContentDBGUID>"
stsadm -o sync -DeleteOldDatabases 0
Also remember that, before moving content database execute the preparetomove command.

No comments:

Post a Comment