Error: Database error | 19: Column DstDn is not Unique
Created: 2012-04-20 08:09:59Modified: 2022-09-10 09:00:35
Tags: Custom Mapping Errors Troubleshooting UnitySync
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 Object | cn=kris@phila.com,ou=test26,dc=2k19,dc=test
Database Error | 19
Database Message | UNIQUE constraint failed: object.dstdn
Source DN | CN=Kristine Piccola 2,OU=LoadWithSmallSyncs,OU=T…
Dest DN | cn=kris@phila.com,ou=test26,dc=2k19,dc=test
db srcdn | CN=Kristine Piccola,OU=LoadWithSmallSyncs,OU=Te…
The error output identifies the Source object attempting the Add:
db srcdn | CN=Kristine Piccola,OU=LoadWithSmallSyncs,OU=Te…
The error output also identifies the existing Destination DN already in the connection database:
Dest DN | cn=kris@phila.com,ou=test26,dc=2k19,dc=test
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: kris@phila.com
)
There is a Source Entry
for each Source object. You should find more than one Source entry with the value mail: kris@phila.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=Kris Smith,OU=Sales,DC=Acme,DC=com
objectClass: top
objectClass: person
objectClass: organizationalPerson
objectClass: user
department: Sales
cn: Joe Mallor
displayName: Kris Smith
objectGUID:: 8EYAIqnFgE+Xr91Tvw4Q==
mail: kris@phila.com>>>
(snip)
****************** Source Entry ******************
dn: CN=Kristine Smith,OU=Support,DC=Acme,DC=com
objectClass: top
objectClass: person
objectClass: organizationalPerson
objectClass: user
department: Support
cn: Kris Smith
displayName: Kristine Smith
objectGUID:: 8EYAIqnFgE+Xr91Tvw4Q==
mail: kris@phila.com>>>
Options:
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.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=Kristine Smith,OU=Support,DC=Acme,DC=com
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.