Unable to export to FIM MA - Violation of UNIQUE KEY constraint 'UK_ExportKey_SequenceNumber'
I'm having an issue when trying to export from my FIM MA.
Below is the error / stack trace:
There is an error executing a web service object creation request.
Type: Microsoft.ResourceManagement.WebServices.Client.UnwillingToPerformException
Message: Fault Reason: The endpoint could not dispatch the request.
Fault Details: <DispatchRequestFailures xmlns="http://schemas.microsoft.com/2006/11/ResourceManagement" xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance"
xmlns:xsd="http://www.w3.org/2001/XMLSchema"><DispatchRequestAdministratorDetails><FailureMessage>Request
could not be dispatched.
Exception: Other
Stack Trace: Microsoft.ResourceManagement.WebServices.Exceptions.UnwillingToPerformException: Other ---&gt; System.Data.SqlClient.SqlException: Reraised Error 50000, Level 14, State 1, Procedure ReRaiseException, Line 37, Message: Reraised Error 2627,
Level 14, State 1, Procedure DoAddExportRequest, Line 37, Message: Violation of UNIQUE KEY constraint 'UK_ExportKey_SequenceNumber'. Cannot insert duplicate key in object 'sync.ExportRequest'.
at System.Data.SqlClient.SqlConnection.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.SqlDataReader.ConsumeMetaData()
at System.Data.SqlClient.SqlDataReader.get_MetaData()
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.RunExecuteReader(CommandBehavior cmdBehavior, RunBehavior runBehavior, Boolean returnStream, String method)
at System.Data.SqlClient.SqlCommand.ExecuteReader(CommandBehavior behavior, String method)
at System.Data.SqlClient.SqlCommand.ExecuteReader()
at Microsoft.ResourceManagement.Data.DataAccess.DoRequestCreation(RequestType request, Guid cause, Guid requestMarker, Boolean doEvaluation, Int16 serviceId, Int16 servicePartitionId)
--- End of inner exception stack trace ---
at Microsoft.ResourceManagement.Utilities.ExceptionManager.ThrowException(Exception exception)
at Microsoft.ResourceManagement.Data.Exception.DataAccessExceptionManager.ThrowException(SqlException innerException)
at Microsoft.ResourceManagement.Data.DataAccess.DoRequestCreation(RequestType request, Guid cause, Guid requestMarker, Boolean doEvaluation, Int16 serviceId, Int16 servicePartitionId)
at Microsoft.ResourceManagement.Data.DataAccess.CreateRequest(RequestType request, Guid cause, Guid requestMarker, Boolean doEvaluation, Int16 serviceId, Int16 servicePartitionId)
at Microsoft.ResourceManagement.WebServices.RequestDispatcher.CreateRequest(CreateRequestDispatchParameter dispatchParameter)
at Microsoft.ResourceManagement.WebServices.RequestDispatcher.CreateRequest(UniqueIdentifier requestor, UniqueIdentifier targetIdentifier, OperationType operation, String businessJustification, List`1 requestParameters, CultureInfo locale, Boolean
isChildRequest, Guid cause, Boolean doEvaluation, Nullable`1 serviceId, Nullable`1 servicePartitionId, Boolean maintenanceMode, String synchronizationSequenceIdentifier)
at Microsoft.ResourceManagement.WebServices.RequestDispatcher.CreateRequest(UniqueIdentifier requestor, UniqueIdentifier targetIdentifier, OperationType operation, String businessJustification, List`1 requestParameters, CultureInfo locale, Boolean
isChildRequest, Guid cause, Boolean doEvaluation, String synchronizationSequenceIdentifier)
at Microsoft.ResourceManagement.WebServices.ResourceManagementService.Create(Message request)</FailureMessage><DispatchRequestFailureSource>Other</DispatchRequestFailureSource></DispatchRequestAdministratorDetails></DispatchRequestFailures>
Stack Trace: at Microsoft.ResourceManagement.WebServices.Client.ResourceTemplate.CreateResource(Guid identifier, String synchronizationSequenceIdentifier)
at MIIS.ManagementAgent.RavenMA.ExportObjectCreation(DataSourceObject dsObject, SchemaManager schemaManager, Boolean specifyObjectId)
at MIIS.ManagementAgent.RavenMA.Export(DataSourceObject dsObject)
Inner Exception: The endpoint could not dispatch the request.
Any ideas?
February 18th, 2011 6:11pm
What are you trying to export?
"Cannot insert duplicate key in object"/Frederik Leed
Free Windows Admin Tool Kit Click here and download it now
February 19th, 2011 2:34pm
What are you trying to export?
"Cannot insert duplicate key in object"/Frederik Leed
February 19th, 2011 2:34pm
I'm exporting to FIM MA. I'm getting errors when it tries to do the following:
Modificatino type: add
Object Type: DetectedRuleEntry
This happens for 5000 objects then the system kicks out after reaching an error threshold.
Free Windows Admin Tool Kit Click here and download it now
February 21st, 2011 10:15am
I'm exporting to FIM MA. I'm getting errors when it tries to do the following:
Modificatino type: add
Object Type: DetectedRuleEntry
This happens for 5000 objects then the system kicks out after reaching an error threshold.
February 21st, 2011 10:15am
I also just noticed these are happing when tryping to update a person object.
Free Windows Admin Tool Kit Click here and download it now
February 21st, 2011 10:16am
I have encountered this error before, but I don't recall what the exact issue is. Typically if there is an issue with unique contraint due to a schema or binding layer regular expression you'll get a different error; however, while some attributes are enforced
as unique keys like:
AccountName ObjectSID MVObjectID
...I don't believe this is what is causing the error. I would try a Full Import (stage only) from the FIM MA first to see if that clears it up.Brad Turner, ILM MVP - Ensynch, Inc - www.identitychaos.com [If a post helps to resolve your issue, please click the "Mark as Answer" or "Helpful" button at the top of that post. By marking a post as Answered or Helpful, you help others
find the answer faster.]
February 21st, 2011 3:35pm
I've performed a Full Import and then a Full Synchronization afterwards and the issue still exists. I don't think the issue is related to the regular expression rules. I believe those are applied at the web service layer. This error appears to be a SQL
error. I looked at the table and constraint and nothing seemed glaringly wrong.
Free Windows Admin Tool Kit Click here and download it now
February 21st, 2011 3:46pm
Do you get any errors during the Full Import? It sounds like it's trying to insert the same ObjectID into the export process. If you got any errors at all during the FI then obsoletion won't run and you won't clear out any transitory objects. Make sure you
get a clean FI, then I would try disabling SR provisioning (Tools\Options) and running a Full Sync from your authoritative data sources to clear out any provisioning orphans.Brad Turner, ILM MVP - Ensynch, Inc - www.identitychaos.com [If a post helps to resolve your issue, please click the "Mark as Answer" or "Helpful" button at the top of that post. By marking a post as Answered or Helpful, you help others
find the answer faster.]
February 21st, 2011 6:04pm
Thanks for the suggetsions, I've already tried this as well. Disabling SR and FI / sync was the first thing I did.
Free Windows Admin Tool Kit Click here and download it now
February 22nd, 2011 12:24pm
I have actually been experiencing something similar to this and i'm working with PSS on it.
http://social.technet.microsoft.com/Forums/en/ilm2/thread/db83979c-3cef-48f9-9233-0c86eced0ad8 /Frederik Leed
March 8th, 2011 3:39am
I have actually been experiencing something similar to this and i'm working with PSS on it.
http://social.technet.microsoft.com/Forums/en/ilm2/thread/db83979c-3cef-48f9-9233-0c86eced0ad8 /Frederik Leed
Free Windows Admin Tool Kit Click here and download it now
March 8th, 2011 3:39am
I got same problem with KB2502631 and KB2417774 -> when run FIM Export step I got error
"Message: Violation of UNIQUE KEY constraint 'UK_ExportKey_SequenceNumber'. Cannot insert duplicate key in object 'sync.ExportRequest'."
my configuration is Windows 2008 R2, SQL Server 2008 R2
I did some test installation FIM with different order installation updates:
RTM + Update1(KB978864) - work, no problems
RTM + Update1(KB978864) + Update2(KB2417774) - error FIM Export "Violation of UNIQUE KEY..."
RTM + Update1(KB978864) + Update2(KB2417774) + PostUpdate2(KB2502631) - error FIM Export "Violation of UNIQUE KEY..."
RTM + Update1(KB978864) + PostUpdate2(KB2502631) - error FIM Export "Violation of UNIQUE KEY..."
RTM + Update2(KB2417774) - error http://social.technet.microsoft.com/Forums/en-CA/ilm2/thread/583fe304-741e-40f3-9fd1-059bd1622944
RTM + PostUpdate2(KB2502631) - error FIM Export "Violation of UNIQUE KEY..."
I change SQL from 2008 R2 to 2008
RTM + PostUpdate2(KB2502631) - error FIM Export "Violation of UNIQUE KEY..."
In all test when I get error FIM Export "Violation of UNIQUE KEY..." -
only one objects successful exported!!! but other stoped with violent of unique key error! next export succesfull exported another one object.....
any solitions?
July 2nd, 2011 6:48am
There's a bug in 4.0.3573.2. If you miss update 1 you'll get this error. It's an installer bug. There's a newer build that fixes this: 4.0.3576.2:
http://support.microsoft.com/?id=2502631
Free Windows Admin Tool Kit Click here and download it now
July 2nd, 2011 2:49pm
4.0.3573.2 = Update2(KB2417774)
4.0.3576.2 = PostUpdate2(KB2502631)
but
I have FIM Export sync error :(
do
you now work order how to install FIM correctly?
July 3rd, 2011 9:36am
There's a bug in 4.0.3573.2. If you miss update 1 you'll get this error. It's an installer bug. There's a newer build that fixes this: 4.0.3576.2:
http://support.microsoft.com/?id=2502631
This update
does not solve the
problem
Free Windows Admin Tool Kit Click here and download it now
July 3rd, 2011 5:00pm
Siderman,
I think Paul is referring to the bug with build 4.0.3573.2. If you installed this one on top of FIM RTM you could end up with a corrupted FIM Service DB. And this is what's fixed in the installer of 4.0.3576.2 as Paul states.
For more information see the FIM BUILD overview wiki:
http://social.technet.microsoft.com/wiki/contents/articles/fim-2010-build-overview.aspx In red there's a small note regarding this bug.
The note states: the only way to fix this is the go back (backup-restore) to before applying the update which broke the DB. Or by contacting PSS which probably has a SQL script to fix this for you. You
cannot fix this yourself by unapplying/reapplying hotfixes on a broken DB.
Regards,
Thomashttp://setspn.blogspot.com
July 3rd, 2011 5:22pm
Thomas Vuylsteke,
"And this is what's fixed in the installer of 4.0.3576.2 as Paul states"
http://social.technet.microsoft.com/wiki/contents/articles/fim-2010-build-overview.aspx
"All hotfix rollups are cumulative, this means you can start from RTM and
install the desired build level withouth having to install all previous released build versions."
when I install clean FIM RTM and than applying 4.0.3576.2 -> I get error FIM Export "Violation of UNIQUE key..."
why this problem occurs if you say that 4.0.3576.2 fixed it?
Free Windows Admin Tool Kit Click here and download it now
July 4th, 2011 2:34am
I'm sorry If I missunderstood your situation. And indeed all hotfix rollups are cumulative (besides the one for 4.0.3573.2 which introduces an issue).
I myself have never had this issue. All my installes were Update 1. So I never went from RTM to the last hotfix. If you are installing 4.0.3576.2 on top of RTM you should indeed not suffer this issue.
What objects are you trying to export?http://setspn.blogspot.com
July 4th, 2011 8:09am
this objects from AD MA Import step... they contain user information
in Update 1 everything work perfect!
I configure 2 MA: AD + FIM
than import users from AD(MA AD) + FullSync(MA AD)
next step: Export (MA FIM) -> onle first object successfull exported and other generate errors "Violation of
UNIQUE KEY..."
it remains a mystery to me...
to reproduce this error you can install RTM, last fix (3576.2)
Free Windows Admin Tool Kit Click here and download it now
July 4th, 2011 11:04am
From
http://social.technet.microsoft.com/Forums/en-CA/ilm2/thread/583fe304-741e-40f3-9fd1-059bd1622944 I conclude the following:
You took a backup of a FIM Service DB which was at "Updated2" = 4.0.3573.2 You reinstalled FIM, patched Update 1 and patched Update 2 Restored the DB Patched to 4.0.3567.2
Is the above still correct or are you currently troubleshooting an other situation? More particulary step 3, did you, or did you not, restored the FIM Service DB?
http://setspn.blogspot.com
July 4th, 2011 11:32am
this is another problem :)
when install RTM, and then install Update2(3573.2) - i get limit export user = 50 and then get errors.... but FIM Export processed more then 1 object and
not generate error "Violation of UNIQUE KEY..."
in my installation test 50 limit is:
RTM + Update1(KB978864) - work, no problems
RTM + Update1(KB978864) + Update2(KB2417774) - error FIM Export "Violation of UNIQUE KEY..."
RTM + Update1(KB978864) + Update2(KB2417774) + PostUpdate2(KB2502631)
- error FIM Export "Violation of UNIQUE KEY..."
RTM + Update1(KB978864) + PostUpdate2(KB2502631)
- error FIM Export "Violation of UNIQUE KEY..."
RTM + Update2(KB2417774) -
error http://social.technet.microsoft.com/Forums/en-CA/ilm2/thread/583fe304-741e-40f3-9fd1-059bd1622944
<------ 50 limit error
RTM + PostUpdate2(KB2502631)
- error FIM Export "Violation of UNIQUE KEY..."
" More particulary step 3, did you, or did you not, restored the FIM Service DB?""
I try restore DB using http://technet.microsoft.com/en-us/library/fim-2010-backup-and-restore-guide(v=ws.10).aspx
but problem not resoved, when I update FIM to 3576.2 - i another error -> "Violation
of UNIQUE KEY..."
Free Windows Admin Tool Kit Click here and download it now
July 4th, 2011 11:44am
Question 1: I still don't completely get what you are doing. How many upgrade paths have you tested? 6 orso? Every time with a fresh RTM DB or did you used a restored DB?
Question 2: in RTM + PostUpdate2(KB2502631) - error FIM Export "Violation of UNIQUE KEY..."
So in this siutation, can you explain step by step how you got to the error?
Install FIM from RTM with NEW DB Install KB2502631 Configure FIM SYNC/MA's Configure declarative rules start syncing get error
Is that accurate?http://setspn.blogspot.com
July 4th, 2011 3:21pm
Answer 1: In all test I used clean FIM DB, do not used restore (virtual machine saved state with clean FIM RTM installed)
Answer 2: Yes, I used this order configuration steps
a. Install clean FIM RTM with new DB
b. Install KB2502631
c. Create 2 MA: AD Sync (named Sync with AD) + FIM Sync (named Sync with FIM)
d. Add attributes to Person class (for SyncRules)
- ad_dn(string indexable)
- ad_changepassword(string non-indexable)
- INN(string indexable)
- userPrincipalName(string indexable)
- userAccountControl(string indexable)
- countryID(string indexable)
- homeDirectory(string indexable)
e. Add AD User SyncRule (inbound and outbound)
- Metaverse resource type: person
- External System: Sync with AD
- External System Resource Type: user
- Relationship: accountName <-> sAMAccountName
- Checked "Create resource in FIM"
- Checked "Create resource in external system"
- Checked "Disconnect FIM resource from external system..."
- Configure Outbound/Inbound Attributes Flows (if needed I can get more detailed configuration)
f. Add User Workflow
- Type: action
- Checked run on policy update
- Activity: sync rule in step "e" - action selection "Add"
g. Add User MPR
- Type: request
- Requestor: All people
- Operation: Create, Add, Remove, Modify
- Resource before request: all people
- Resource after request: all full time employees
- Resource attributes: All
h. Add User MPR Transition In
- Type: Set transition
- Set: All people
- Type: Transition In
- Action workflow: step F
i. Add run profiles for AD MA: Export, Full import (Stage only), Delta Sync
j. Add run profiles for FIM MA: Export, Full import (Stage only), Delta Sync
k. Run profiles with this order:
- FIM MA: Export
- FIM MA: Import
- FIM MA: Delta Sync
- AD MA: Export
- AD MA: Import
- AD MA: Delta Sync
l. in this step everything OK
m. Add to AD MA organizational unit from active directory with 120 users
n. Rerun step k and get in "AD MA: Import" 120 users from AD -> in next step "AD MA Delta Sync" FIM send 120 user objects to "FIM MA: Export"
o. Rerun step k, only first object successful exported in "FIM MA: Export", but others generate errors: "Violation
of UNIQUE KEY..."
! in update 1 this configuration algoritm work perfect, without errors
Free Windows Admin Tool Kit Click here and download it now
July 5th, 2011 2:53am
Fighter, you mention going RTM --> 4.0.3573.2. And you also mention restoring a database?
If you go RTM to 4.0.3573.2 you will hit the bug that caps exports around 50 and also this unique key issue. You need to go RTM --> 4.0.3576.2.
If you restore a database then the state of that database will depend on whether or not we're going to hit the bug again. The "bug" is a bad stored procedure. If you restore a database you'll restore the trashed SP too.
If you're installing RTM and then 4.0.3576.2 (http://support.microsoft.com/?id=2502631) then we have a different issue, providing you aren't restoring the database on top of this database (effectively
rolling back to a prior state).
Assuming you're on a fresh 4.0.3576.2 can you please ensure that you've performed a FULL IMPORT and FULL SYNCHRONIZATION on all MAs.
Start with the FIM MA. FI & FS. Check precedence, alter, etc. then FS FIM MA again. Then FI & FS AD MA. Then export.
July 5th, 2011 4:25am
I try backup-restore procedures with 3573.2, but when found this I begin tests with 3576.2:
http://social.technet.microsoft.com/wiki/contents/articles/fim-2010-build-overview.aspx
"All
hotfix rollups are cumulative, this means you can start from RTM and install the desired build level withouth
having to install all previous released build versions."
"Assuming you're on a fresh 4.0.3576.2 can you please ensure that you've performed a FULL IMPORT and FULL SYNCHRONIZATION
on all MAs."
I try Full import ans Sync with AD MA and FIM MA, but errors still exists :(
Can anyone else repeat my fim configuration? any other solutions?
why only 1 object successful exported with FIM MA Export?? this is mysterious for me ;)
Free Windows Admin Tool Kit Click here and download it now
July 5th, 2011 7:09am
I try this:
Install FIM RTM, configure MAs, RunProfiles...
Run FIM MA FullImport(success) -> FIM MA FullSync(success) -> FIM MA FullSync(success) ->AD MA FullImport(success - add 126 objects) -> AD MA FullSync (success -> send to FIM MA Export 104 object) -> FIM MA Export (success - Add 102 object)
then I install 3576.2
Run FIM MA FullImport(success - add 204 object) -> FIM MA FullSync(success -> send to FIM MA Export 102 objects, Projection 102 object) -> FIM MA FullSync(success -> send to FIM MA Export 102 objects, Projection 0 object)
->AD MA FullImport(success - add 1 objects) -> AD MA FullSync (success -> send to FIM MA Export 1 object) -> FIM MA Export (completed-export-errors - Add 1 object success, 102 error with completed-export-errors)
Add to AD MA new OU from Active Directory with more then 120 users
Run FIM MA FullImport(success - add 2 object) -> FIM MA FullSync(success -> send to FIM MA Export 103 objects, Projection 1 object) -> FIM MA FullSync(success -> send to FIM MA Export 103 objects, Projection 0 object)
->AD MA FullImport(success - add 134 objects) -> AD MA FullSync (success -> send to FIM MA Export 130 object) -> FIM MA Export (completed-export-errors - Add 1 object success, 232 error with completed-export-errors)
July 6th, 2011 4:39am
I try this:
Install FIM RTM, configure MAs, RunProfiles...
Run FIM MA FullImport(success) -> FIM MA FullSync(success) -> FIM MA FullSync(success) ->AD MA FullImport(success - add 126 objects) -> AD MA FullSync (success -> send to FIM MA Export 104 object) -> FIM MA Export (success - Add
102 object)
then I install 3576.2
Run FIM MA FullImport(success - add 204 object) -> FIM MA FullSync(success -> send to FIM MA Export 102 objects, Projection 102 object) -> FIM MA FullSync(success -> send to FIM MA Export 102 objects, Projection 0 object)
->AD MA FullImport(success - add 1 objects) -> AD MA FullSync (success -> send to FIM MA Export 1 object) -> FIM MA Export (completed-export-errors - Add 1 object success,
102 error with completed-export-errors)
Add to AD MA new OU from Active Directory with more then 120 users
Run FIM MA FullImport(success - add 2 object) -> FIM MA FullSync(success -> send to FIM MA Export 103 objects, Projection 1 object) -> FIM MA FullSync(success -> send to FIM MA Export 103 objects, Projection 0 object)
->AD MA FullImport(success - add 134 objects) -> AD MA FullSync (success -> send to FIM MA Export 130 object) -> FIM MA Export (completed-export-errors - Add 1 object success,
232 error with completed-export-errors)
Free Windows Admin Tool Kit Click here and download it now
July 6th, 2011 11:34am
, м.
FighterZP,
м м м м, : http://social.technet.microsoft.com/Forums/ru-RU/ws2008ru/thread/2d69484d-f94b-4964-9b4c-4064bf97a1b7
м м maddymask@inbox.ru ?
July 7th, 2011 3:44am
For those which suck at foreign languages, a google translate ;)
Sorry,
I'm here
is unexpectedly interrupted.
FighterZP,
I have
a question for you is
about the
old problem you
mentioned here:
http://social.technet.microsoft.com/Forums/ru-RU/ws2008ru/thread/2d69484d-f94b-4964-9b4c-4064bf97a1b7
Could you
give me your contact details
to
maddymask@inbox.ru?
http://setspn.blogspot.com
Free Windows Admin Tool Kit Click here and download it now
July 7th, 2011 4:57am
I think that if
Microsoft did not
fix the
bug discussed here
is
seriously shake
the reputation
of the product.
We
remember about
Windows Vista))
By the way,
if there is a
naive, wishing to use the
Update 1
release to
correct
the update has to
frustrate
them -
Update 1 does not work properly
with
Exchange 2010
SP1
July 7th, 2011 5:50pm
I've e-mailed
Steve and
Glenn and they're both able to reproduce the problem. We don't know the full extent of what is causing it yet -they're actively investigating that. However it would appear the behaviour exhibits itself when you have enabled a drop file on the
FIM MA. Please check to see if you have a log file defined and if so, turn off logging to the drop file.
Free Windows Admin Tool Kit Click here and download it now
July 8th, 2011 3:10am
Yeh!!!!! ))))))) ITS WORK!!!!!!!!!!!!!!!!!!! THANKS!!!!!!!!!!!!!
I remove from FIM MA Export Step logging to file, and all object sucess exported!!! its amazing, perfect and many good word in russian language ))))
July 8th, 2011 4:16am
I can't mark it post "Answer" )
Free Windows Admin Tool Kit Click here and download it now
July 8th, 2011 4:17am
The orginal question was started as a "discussion" rather than a "question". So you can't mark it as answer.
Paul, how did you come by the idea of the drop file? Just curious :)http://setspn.blogspot.com
July 8th, 2011 6:32am
I'm afriad I didn't. That was Steve. He noticed that that looked to be causing the issue and Glenn quickly repro'd. Steve's filed a bug on it.
Free Windows Admin Tool Kit Click here and download it now
July 8th, 2011 8:16am
"Steve's filed a bug on it."
Balmer? :)
Steve, Thanks for solution!
July 8th, 2011 10:16am