问题:
运行在服务器上以及有多个复本的数据库难免会出现复制与保存冲突的情况。如何处理这种情况是所有Notes管理员和设计者都要面对的问题。
复制与保存冲突可由以下原因造成:
在两次复制之间,如果有两个用户同时编辑或多个用户编辑了不同数据库复本上的相同文档,就会出现复制冲突。
如果有两个或多个用户同时编辑同一个数据库的同一个文档,则会出现保存冲突。
解决方法:
一、可以在表单属性框中的基本付签选中:“合并复制冲突”,并知底功能表单基本付签中的版本选项。
二、在这里介绍一些和处理复制与保存冲突情况有关的方法与技巧:
1、创建列出所有冲突文档的视图:(VewConflict)
冲突文档都包含一个名为“$Conflict”的域,因此可以用下面的试图选择公式列出所有冲突文档。
SELECT @ISAvailable(”$Conflict“)
2、将冲突文档与主文档同屏显示以便比较两者之间的差别:
由于冲突文档被保存为主文档的答复文档,在打开冲突文档以后使用快捷图标“显示/隐藏预览主文档”,主文档就会被显示在预览窗格中了。
3、附加菜单命令比较两个文档之间的差别:
在Notes.ini文件中加入下面一行:
AddInMenus=C:\Notes\nntediff.dll
然后重起Notes,就回发现“操作”菜单中多了一项“Different of 2 document”.
4、找到冲突文档的主文档:
Sub Click(Source as Button)
Const FolderName=”ReplicationConFlict”
dim s As New NotesSession
dim doccol as NotesDocumentCollection
dim doc as Notesdocument,topdoc as notesdocument
dim folder as notesView
set dbcur=s.currentdatabase
set doccol.dbcur.unprocesseddocuments
set doc=doccol.getfirstdocument
while not(doc is nothing)
set topdoc=gettopdoc(doc)
call topdoc.putinfolder(Foldername)
set doc=doccol.getnextdocument(doc)
wend
End Sub
Function GetTopDoc(DocSource as notesDocument) as NotesDocument
dim doctop as notesdocument
dim strUNID as String
set doctop=docsource
strUNID=doctop.ParentDocumentUNID
Do While (strUNID<>”")
set DocTop=dbCur.GetDocumentByUNID(StrUNID)
strUNID=doctop.ParentdocumentUNID
loop
set GetTopDoc=doctop
End Functiong
5、将冲突文档保存为主文档
选种若干冲突文档后运行下面代理。这个代理把选种的冲突文档保存为主文档。
dim s as new notessession
set db=s.currentdatabase
set dc=db.unprocessedDocuments
set doc=dc.getfirstdocument
‘$conflict是冲突文档的标志
call doc.removeItem(”$Conflict“)
‘得到冲突文档的主文档
if doc.isResponse then
Set Parent=db.GetDocumentByUNID(doc.ParentDocumentUNID)
if parent.IsResponse then
‘如果文档是答复的答复
dim GrandParant as Notesdocument
Set GrandParant=db.GetDocumentByUNID(Parent.ParentDocumentUNID)
call doc.MakeResponse(GrandParent)
else
‘$Ref 域是答复文档的标志
call doc.RemoveItem(”$Ref”)
end if
end if
call doc.save(True,True)
SP:
当使用LS在后台创建文档的时候,表单中“合并复制冲突”选项无效,在文档中加入下面代码:
doc.$Conflicts=”1″
如何处理Lotus的复制与保存冲突
精选 转载
提问和评论都可以,用心的回复会被更多人看到
评论
发布评论
相关文章
-
老板如何处理与员工的关系
第三部分 老板如何处理与员工的关系 ——老板处理好与员工关系的18种规则 老板算出获得多少
工作 教育 人力资源管理 高效率 -
php 如何处理 emoji 表情,保存到 mysql
php 如何处理 emoji 表情,保存到 mysql不考虑数据库的编码格式什么之类的,最直接的方法就是把文本中的 emoji 转换成文本保存。取
php emoji mysql unicode ico -
Java 代码如何处理主键冲突异常 oracle主键冲突的异常
一,情况说明 最近现场生产环境,有十多个涉及序列的表,报主键冲突。 现场人员和公司开发人员,只是修改序列的当前值,修改完,开始好用,后来又报错。 开发人员:之前有部分功能用错序列,后来改正过来。这次确定不是用错序列,需要我们协助分析。 现场实施
Java 代码如何处理主键冲突异常 java Oracle 主键冲突 sequences -
Lotus notes问题与处理
注:以下的问题分析与处理是本人在日常遇到的问题与解决办法,可能因为其它原因造成的问题不包括在此范围内。仅针对R6.0和R8.5版
lotus 服务器 客户端 数据库 右键