Notrix 6.0 生成的SQL 语句兼容问题

预期结果:借助第三方软件Notrix实现在Notes和MS SQL之间复制数据,达到数据信息的同步。

问题描述:执行Replication Job后,此job对应的日志中提示报错:

 

 

问题原因

我们做了如下测试,执行此SQL 语句:

select * from Requset  holdlock  where TicketNo='P100525050902'

1、在SQL 2000中执行成功。

2、在SQL 2005中执行失败,报错信息为:

Notrix Job Log

Job Name: Workflow_PSTAndSQL_Test
Notrix Version: 6.0 Build 20080301 for Notes R 8.0.1 on Windows NT 5.2 Build 3790 Service Pack 2
Executed on:  05/28/2010 05:58:25 PM
Completed on: 05/28/2010 05:58:27 PM 
Job Return Code: 4

The Notrix Job issued the following messages:
___________________________________________
28 May 2010 05:58:25 Running job Workflow_PSTAndSQL_Test from NXJOB.NSF
Connecting to MS SQL Server-AX-RISCDCSQL515\SQL515...
Starting replication...
NXERR.ERROR 150 This view does not have 'No Response Hierarchy' selected in the 'View Attributes'.  If response documents exist in the view, they will not be located for update.  workflow_temp_alfred
NXERR.ERROR 110 Unable to write to field Unable to update insert SQL row
NXERR.ERROR 110 Unable to write to field Unable to update insert SQL row
NxCmpReplicate failed, rc=4
Slave MSGCode>> 5701; 13257; 13257; 10007; 1018; 13257; 13257; 10007; 1018; 15647; 15470; 15469; 15472
Slave MSGText>> Changed database context to 'APMD'.; UPDATE APMD..Workflow_PSTRequest SET Author=NULL WHERE TicketNo='S100406031604'; SELECT Author FROM APMD..Workflow_PSTRequest HOLDLOCK  WHERE TicketNo='S100406031604'; General SQL Server error: Check messages from the SQL Server.; Incorrect syntax near 'holdlock'. If this is intended as a part of a table hint, A WITH keyword and parenthesis are now required. See SQL Server Books Online for proper syntax.; UPDATE APMD..Workflow_PSTRequest SET Author=NULL WHERE TicketNo='S100406031459'; SELECT Author FROM APMD..Workflow_PSTRequest HOLDLOCK  WHERE TicketNo='S100406031459'; General SQL Server error: Check messages from the SQL Server.; Incorrect syntax near 'holdlock'. If this is intended as a part of a table hint, A WITH keyword and parenthesis are now required. See SQL Server Books Online for proper syntax.; No views with schema binding reference table 'Workflow_PSTRequest'.; No foreign keys reference table 'Workflow_PSTRequest', or you do not have permissions on referencing tables.; No constraints are defined on object 'Workflow_PSTRequest', or you do not have permissions.; The object 'Workflow_PSTRequest' does not have any indexes, or you do not have permissions.
                 Notes       SQL      
---------------  ----------  ----------
Updates                   0           0
Inserts                   0           0
Skips                     1           1
Deletes                   0           0
Conflicts                 0         N/A
Failures                  0           2
Total replication time = 00:00:00
Failure report for SQL:
Failure    Reason
   Keys
---------- --------------------------------------------------
1          Unable to update/insert row in SQL
   NoteID NT0000C602 
2          Unable to update/insert row in SQL
   NoteID NT0000C606 
Disconnecting from MS SQL Server-AX-RISCDCSQL515\SQL515...
Processing error in REXX!   ID = 4


Copyright  ? 1993-2008 by Axceler,  All Rights Reserved.

 

 

can't update from notes db to sql db

3、在SQL 2005中修改兼容性为“SQL2000”后执行成功。

 

解决办法:修改对应的SQL 2005的兼容级别。

 

你可能感兴趣的:(sql,windows,SQL Server,workflow,软件测试)