·        ECMA2 connector to SQL Server
·        One of the column names was 'DN'
·        In GetSchema:
if (string.Equals(key, "dn", StringComparison.CurrentCultureIgnoreCase)){personType.Attributes.Add(SchemaAttribute.CreateAnchorAttribute(key, AttributeType.String));}
·        Upon full import (see event log below):
o   missing-anchor-component
o   invalid-attribute-value
o   staging-error
·        GetImportEntries taken from MSFT example:
public GetImportEntriesResults GetImportEntries(GetImportEntriesRunStep importRunStep){//// In our sample below, we create objects using a fixed format.//GetImportEntriesResults importReturnInfo;List<CSEntryChange> csentries = new List<CSEntryChange>();// Full Import.if (OperationType.Full == m_ImportType){// Object 1CSEntryChange csentry1 = CSEntryChange.Create();csentry1.ObjectModificationType = ObjectModificationType.Add;csentry1.ObjectType = "person";//csentry1.DN = "CN=Object1,CN=Users,DC=contoso,DC=com";csentry1.AttributeChanges.Add(AttributeChange.CreateAttributeAdd("DN", "1"));//csentry1.AttributeChanges.Add(AttributeChange.CreateAttributeAdd("USERNAME", "Object1"));//csentry1.AttributeChanges.Add(AttributeChange.CreateAttributeAdd("email", "Object1@contoso.com"));//csentry1.AttributeChanges.Add(AttributeChange.CreateAttributeAdd("multiAttr", new List<object>() { "value1", "value1", "value3" }));csentries.Add(csentry1);// Object 2CSEntryChange csentry2 = CSEntryChange.Create();csentry2.ObjectModificationType = ObjectModificationType.Add;csentry2.ObjectType = "person";//csentry2.DN = "CN=Object2,CN=Users,DC=contoso,DC=com";csentry2.AttributeChanges.Add(AttributeChange.CreateAttributeAdd("DN", "2"));//csentry2.AttributeChanges.Add(AttributeChange.CreateAttributeAdd("USERNAME", "Object2"));//csentry2.AttributeChanges.Add(AttributeChange.CreateAttributeAdd("email", "Object2@contoso.com"));//csentry2.AttributeChanges.Add(AttributeChange.CreateAttributeAdd("multiAttr", new List<object>() { "value4", "value5", "value6" }));csentries.Add(csentry2);}// Create the resultimportReturnInfo = new GetImportEntriesResults();importReturnInfo.MoreToImport = false;importReturnInfo.CSEntries = csentries;// Also, GetImportEntriesResults.CustomData can be used for retaining necessary data// for performing a subsequent import.// A typical case of this might be the watermark used// for delta import.//return importReturnInfo;}
·        Event log:
FIMSynchronizationService 
 | 
The server encountered an unexpected error while performing an operation for a management agent. 
 "Microsoft.MetadirectoryServices.Impl.InternalError: 0x80230301 
   at Microsoft.MetadirectoryServices.Impl.ScriptHost.ThrowExceptionFromHRESULT(Int32 hr) 
   at Microsoft.MetadirectoryServices.Impl.Ecma2ConversionServices.AddAttributeToDImage(CDImage* pdimage, String attributeName, AttributeModificationType attributeModificationType, IList`1 attributeValueChanges, Int32 escapeReferenceDNValues) 
   at Microsoft.MetadirectoryServices.Impl.Ecma2ConversionServices.ConvertToDImage(CSEntryChange csEntryChange, CDImage** ppDImage, Int32 escapeReferenceDNValues) 
   at Microsoft.MetadirectoryServices.Impl.ScriptHost.InvokeExtMA_ImportEntry(UInt32 cBatchSize, UInt16* pcszCustomData, UInt32 cFullObject, _OCTET* rgoctFullObject, UInt32* rgomodt, UInt32* pcpcszChangedAttributes, UInt16*** prgpcszChangedAttributes, Int32 fIsDNStyleNone, UInt16** ppszUpdatedCustomData, _OCTET* rgoctCSImage, Int32* rgextec, UInt16** rgpszErrorName, UInt16** rgpszErrorDetail, Int32* pfMoreToImport)" 
 | 
FIMSynchronizationService 
 | 
The server encountered an unexpected error in the synchronization engine: 
 "BAIL: MMS(8916): d:\bt\32669\private\source\miis\server\sync\syncstage.cpp(595): 0x80230302 (The image or delta doesn't have an anchor.) 
Forefront Identity Manager 4.1.3559.0" 
 | 
FIMSynchronizationService 
 | 
The server encountered an unexpected error in the synchronization engine: 
 "BAIL: MMS(6992): d:\bt\32669\private\source\miis\ma\xml\ma.cpp(5012): 0x80230005 (Management agent encountered an error while processing an object.) 
BAIL: MMS(6992): d:\bt\32669\private\source\miis\server\sync\syncstage.cpp(595): 0x80230302 (The image or delta doesn't have an anchor.) 
Forefront Identity Manager 4.1.3559.0" 
 | 
FIMSynchronizationService 
 | 
The server encountered an unexpected error in the synchronization engine: 
 "BAIL: MMS(13268): d:\bt\32669\private\source\miis\ma\xml\ma.cpp(5078): 0x80230005 (Management agent encountered an error while processing an object.) 
BAIL: MMS(13268): d:\bt\32669\private\source\miis\shared\ldaputils\dnutils.cpp(580): 0x80070057 (The parameter is incorrect.): Error parsing DN 99999: DN terminates in attribute name 
BAIL: MMS(13268): d:\bt\32669\private\source\miis\ma\extensible\extensible.cpp(2057): 0x80070057 (The parameter is incorrect.) 
BAIL: MMS(13268): d:\bt\32669\private\source\miis\server\sync\syncstage.cpp(595): 0x80230302 (The image or delta doesn't have an anchor.) 
Forefront Identity Manager 4.1.3559.0" 
 | 
FIMSynchronizationService 
 | 
The server encountered an unexpected error in the synchronization engine: 
 "BAIL: MMS(8916): d:\bt\32669\private\source\miis\ma\xml\ma.h(734): 0x80230005 (Management agent encountered an error while processing an object.) 
BAIL: MMS(8916): d:\bt\32669\private\source\miis\ma\xml\ma.cpp(4358): 0x80230005 (Management agent encountered an error while processing an object.) 
BAIL: MMS(8916): d:\bt\32669\private\source\miis\ma\xml\ma.cpp(5240): 0x80230005 (Management agent encountered an error while processing an object.) 
BAIL: MMS(8916): d:\bt\32669\private\source\miis\server\sync\syncstage.cpp(595): 0x80230302 (The image or delta doesn't have an anchor.) 
Forefront Identity Manager 4.1.3559.0" 
 | 
Thanks a bunch :) :) :)
ReplyDeleteSaved me a lot of digging
I am very happy to discover your post as it will become on top in my collection of favorite blogs to visit. https://view.ly/v/MXfpB9r8EUb2
ReplyDelete