Portal Engine Questions on portal engine and web parts.
Version 7.x > Portal Engine > User Sync Fails from Staging to Production View modes: 
User avatar
Member
Member
idorko - 3/28/2013 4:37:17 PM
   
User Sync Fails from Staging to Production
A little background:
I've written a scheduled task on my staging server that grabs user data from AD and either creates or updates users in Kentico based on that information. I then sync the user data from staging to production, which has been working fine until this morning. The AD sync to staging works fine, but when I try to sync staging to production, three new user accounts fail with the following error:
	Synchronization server error: Exception occurred: [DataConnection.HandleError]: Query: UPDATE CMS_User SET [UserName] = @UserName, [FirstName] = @FirstName, [MiddleName] = @MiddleName, [LastName] = @LastName, [FullName] = @FullName, [Email] = @Email, [UserPassword] = @UserPassword, [PreferredCultureCode] = @PreferredCultureCode, [PreferredUICultureCode] = @PreferredUICultureCode, [UserEnabled] = @UserEnabled, [UserIsEditor] = @UserIsEditor, [UserIsGlobalAdministrator] = @UserIsGlobalAdministrator, [UserIsExternal] = @UserIsExternal, [UserPasswordFormat] = @UserPasswordFormat, [UserCreated] = @UserCreated, [LastLogon] = @LastLogon, [UserStartingAliasPath] = @UserStartingAliasPath, [UserGUID] = @UserGUID, [UserLastModified] = @UserLastModified, [UserLastLogonInfo] = @UserLastLogonInfo, [UserIsHidden] = @UserIsHidden, [UserVisibility] = @UserVisibility, [UserIsDomain] = @UserIsDomain, [UserHasAllowedCultures] = @UserHasAllowedCultures, [UserSiteManagerDisabled] = @UserSiteManagerDisabled WHERE [UserID] = @UserID: caused exception: The UPDATE statement conflicted with the REFERENCE constraint "FK_CMS_UserSettings_UserSettingsUserGUID_CMS_User". The conflict occurred in database "KenticoIntranet", table "dbo.CMS_UserSettings", column 'UserSettingsUserGUID'. The statement has been terminated.


If I create a new user through the Kentico GUI it syncs fine.

Any thoughts on what might be going on here?

User avatar
Kentico Consulting
Kentico Consulting
richards@kentico.com - 3/29/2013 2:09:44 AM
   
RE:User Sync Fails from Staging to Production
Hi there,

This issue seems not to be Kentico releated, however I tried to research it a little and there might be some restriction errors.

When tables are referenced by Foreign Key constraints it gets difficult to UPDATE the key columns.


Could you please take a look at this and this in order to hopefully resolve the issue?

Kind regards,
Richard Sustek