DirWiz Logo
Knowledgebase

Article Tags

Error: Database error | 19: Column DstDn is not Unique

2019-08-23 09:25:36
Custom Mapping Errors Troubleshooting UnitySync 

Database error | 19: Column DstDn is not Unique

For most effective troubleshooting of this error, turn on Log File level 3-Detailed (General tab) and run the Sync again. The level 3 log will show more helpful information than a default log.

In this error message, Column DstDn refers to the DN of a contact stored within the connection’s database. Each Source object synced must result in a unique DN when the object is created on the Destination. This error indicates the Sync is trying to Add or Modify a Destination object using a DN that already exists in the connection’s database, resulting in the error. What is causing the duplicate DN depends on the DN mapping for this connection.

The format of the DN is defined in your connection’s map file(s). Review the level 3-Detailed log to identify the DN mapping by searching for “Load Person Map”.

i.e.
Load Person Map | ../global/map/custom/DomainA-to-DomainB-person.txt
********************************* Person Map ****************************
dn=cn=~mail#64~,~struct~

In the above example, mail is used in the DN mapping. So, this error would indicate two Source objects have the same email address (mail). One Source object successfully synced previously, another source object is trying to Sync now.

Sample level 3 error output:

Add Exists | cn=josephM@Acme.com,ou=External Contacts,dc=DestDomain,dc=com
Mod Object | cn=josephM@Acme.com,ou=External Contacts,dc=Dest,dc=com
Database Error | 19
Database Message | column dstdn is not unique
db srcdn | CN=Joe Mallory,OU=Sales,DC=Acme,DC=com
db srcindex | c295e53260ddc248ae4f7e109bc1e455
db joinquery | NULL
db dstdn | cn=josephM@Acme.com,ou=External Contacts,dc=DestDomain,dc=com
db crc | 414694936
db flag | 1

The error output identifies the Source object attempting the Add:
db srcdn | CN=Joe Mallory,OU=Sales,DC=Acme,DC=com

The error output also identifies the existing Destination DN already in the connection database:
db dstdn | cn=josephM@Acme.com,ou=External Contacts,dc=DestDomain,dc=com

In order to identify the original Source object (that synced previously) search the level 3-Detailed log for the email address (i.e., search for mail: josephM@Acme.com )

There is a Source Entry for each Source object. You should find more than one Source entry with the value mail: josephM@Acme.com. Check the DN shown in the Source Entry for each record that shows the problem mail value. You will find two source DNs have the same mail' value, as shown below.

******************************** Source Entry ********************************
dn: CN=Joe Mallory,OU=Sales,DC=Acme,DC=com
objectClass: top
objectClass: person
objectClass: organizationalPerson
objectClass: user
department: Sales
cn: Joe Mallor
displayName: Joe Mallory
objectGUID:: 8EYAIqnFgE+Xr91Tvw4Q==
mail: josephM@Acme.com>>>

(snip)

******************************** Source Entry ********************************
dn: CN=Joseph T. Mallory,OU=Support,DC=Acme,DC=com
objectClass: top
objectClass: person
objectClass: organizationalPerson
objectClass: user
department: Support
cn: Joseph T. Mallory
displayName: Joseph T. Mallory
objectGUID:: 8EYAIqnFgE+Xr91Tvw4Q==
mail: josephM@Acme.com>>>

Options:

  1. In order for both of these objects to Sync, one of their values (i.e., mail) must be changed.
    This must be done on your Source.

  2. Alternatively, you can exclude one of the Source objects.
    Note: depending on which Source object you exclude, you may see a Delete then an Add on the next sync run.
    Sample exclude rule: dn=CN=Joseph T. Mallory,OU=Support,DC=Acme,DC=com

  3. Finally, if you receive these errors regularly, you may want to consider customizing the DN mapping so it is more likely to result in a unique value for every sync. This occurs most commonly when an attribute other than the default of mail is used. If you need to use an alternate attribute for your DN mapping, we suggest contacting Support for assistance so they can help you craft the DN mapping in such a way that this error is avoided.

Share this article: Twitter reddit