Hello,I’ve detected that some databases have duplicated universal Id’s.
Why is this? (I assume the “infringing” databases are special in some way, but what way?)
The databases with duplicated UNIDs are (not all of the UNIDs are duplicated, though, AFAICT):
iNotes\Forms5.nsf
iNotes\Forms6.nsf
iNotes\Forms7.nsf
admin4.nsf
On another related note, why is it that I can’t open admin4.nsf with LotusScript? I get:
4063 Database Server/Domain!!admin4.nsf has not been opened yet on line 115
Line 115 is the db.AllDocuments call
(and it’s been opened before with db.Open)
Set dbDir = New NotesDbDirectory(Server)
Set db = dbDir.GetFirstDatabase(DATABASE)
Do While Not db Is Nothing
If Not db.IsOpen Then
Call db.Open(db.Server,db.FilePath)
End If
Dim edc As NotesDocumentCollection
Set edc = db.AllDocuments
'do things with edc
Set db = dbDir.getNextDatabase
Wend
Subject: UniversalID not really universal?
You can not open admin4.nsf probably because you have No Access to the database.
Regarding iNotes databases: I would simply create a local copy of the Forms5.nsf and Forms6.nsf databases (File-Database-New Copy), then remove (make sure you have backup) the databases from the server and then put the copies back to the server. Maybe you don’t even need to put the copies back to the server if users’ iNotes mail databases are updated to the latest version.
Subject: UniversalID not really universal?
The UniversalID of every NotesDocument is really universal within a database. If you have separate non-replica databases then it’s legal for docs with the same unid to appear in both. For example, if you make a non-replica copy of an existing db, then the docs in the new copy will have the same unid as they did in the original.In your code the db variable is already assigned to a database, so change the open call to
If Not db.IsOpen Then
Call db.Open(“”,“”)
End If
Subject: RE: UniversalID not really universal?
Thanks for your response.
So I take those databases (admin4 and Notes5,6,7) have no special meaning?
The code I pasted is a simplified version of the real code. Real code has the call you mention (wrapped with an if). The code iterates over many databases, and the only one that fails the way I pasted in the original message is admin4.nsf. Which, for me (a total Notes newbie), points to admin4.nsf having a special meaning.
So I can rest assured that, since the only way to get the same UNID is to copy a database, all docs with the same UNID are the same doc? or is this not guaranteed and the truly “unique key” of a document is the pair ‘database/unid’ ?
Thanks again,
V.
Subject: RE: UniversalID not really universal?
The unid is really a timestamp, so two docs created at the same instant in totally different databases could have the same unid.The replica id of a database is normally based on creation time too, with the exception of certain system databases that need to be replicas across multiple servers in the organizaation. Databases like admin4.nsf, events4.nsf, etc. that must have the same repid for all servers in the domain derive their repid from the nab. DB’s like clubusy.nsf and cldbdir.nsf that must have the same repid across all servers ina cluster derive their repid from the cluster name.