Hi,
Actually i am using multiple LDAP servers due to distributed environment. So our tree hierarchy can span over multiple LDAP servers.
And i want to use entryUUID as a unique key for my entries of the tree. Can u tell me,entryUUID would be unique over multiple LDAP servers?
Or in case of multiple LDAP servers, Two entries which are residing on different LDAP servers but belongs to the same Tree Hierarchy, can have same entryUUID?
Regards Rakesh Yadav
On Jan 25, 2008 10:36 PM, Michael Ströder michael@stroeder.com wrote:
Rakesh Yadav wrote:
I got your idea about entryUUID, but can u give me some idea about how can i retrieve the value of entryUUID for each entry if it is supported by LDAP system.
Since it's an operational attribute it is not returned by default from OpenLDAP. You have to explicitly request it or request all operational attributes with +.
Example (lines might be wrapped): ldapsearch -b "dc=stroeder,dc=de" -s base "(objectClass=*)" "*" entryUUID
or
ldapsearch -b "dc=stroeder,dc=de" -s base "(objectClass=*)" "*" +
Ciao, Michael.
--
Rakesh Yadav wrote:
Actually i am using multiple LDAP servers due to distributed environment. So our tree hierarchy can span over multiple LDAP servers.
And i want to use entryUUID as a unique key for my entries of the tree. Can u tell me,entryUUID would be unique over multiple LDAP servers?
Or in case of multiple LDAP servers, Two entries which are residing on different LDAP servers but belongs to the same Tree Hierarchy, can have same entryUUID?
Well, you have to clearly specify what that really means.
UUIDs are a general concept for generating unique IDs over time and space. But nothing prevents you to undermine the uniqueness by false administration. And still how UUIDs are used in a certain context is important for saying something about the scope of uniqueness.
In case of OpenLDAP's slapd it's more meaningful to describe when the entryUUID is / is not generated by the DSA:
1. If you add a new entry via LDAP to a LDAP server a new entryUUID is generated. (Use of a DUA like ldapadd or another LDAP client tool)
2. If you add a new entry with slapadd tool a new entryUUID is generated if the LDIF input data does *not* already contain entryUUID attribute. (e.g. when loading initial data from off-site generated LDIF)
3. If you (re-)add a new entry with slapadd tool the entryUUID attribute value is not generated if the LDIF input data already contains an entryUUID attribute (backup/restore case).
4. If an entry is replicated to another slapd server instance the attribute entryUUID is copied to the replicated entry, so no new entry UUID is generated! (normal replication via syncrepl)
If there are more cases I'd ask other readers to add to this list.
Ciao, Michael.
openldap-technical@openldap.org