FIX: Merge Agent failures with articles that have indexed views defined

Article translations Article translations
Article ID: 816780 - View products that this article applies to.
This article has been archived. It is offered "as is" and will no longer be updated.
BUG #: 362976 (SHILOH_BUGS)
Expand all | Collapse all

On This Page

SYMPTOMS

Starting with Microsoft SQL Server 2000 Service Pack 3 (SP3), the Merge Agent may report failures for articles that have an indexed view defined or that have an index on a computed column defined. You may receive the following error message:
Category:SQLSERVER
Source: Server1
Number: 1934
Message: DELETE failed because the following SET options have incorrect settings: 'ANSI_NULLS.'.

CAUSE

The xp_execresultset extended stored procedure is used to create the merge procedures (sp_ins, sp_upd, sp_del, and sp_sel) for articles. Starting with SQL Server 2000 SP3, xp_execresultset has been re-written as a Transact-SQL stored procedure. However, this Transact-SQL stored procedure was incorrectly created with the ANSI_NULLS OFF setting. Because the dynamic EXECUTE statement inherits from the parent procedure setting, the merge procedures (sp_ins, sp_upd, sp_del, and sp_sel) were also created with the ANSI_NULLS OFF setting. This violates the requirements for indexed views that need the ANSI_NULLS setting to be ON. For a complete list of requirements for indexed views, see the "REFERENCES" section of this article.

RESOLUTION

Service pack information

To resolve this problem, obtain the latest service pack for Microsoft SQL Server 2000. For additional information, click the following article number to view the article in the Microsoft Knowledge Base:
290211 How to obtain the latest SQL Server 2000 service pack

Hotfix information

The English version of this hotfix has the file attributes (or later file attributes) that are listed in the following table. The dates and times for these files are listed in coordinated universal time (UTC). When you view the file information, it is converted to local time. To find the difference between UTC and local time, use the Time Zone tab in the Date and Time tool in Control Panel.
      Date      Time   Version         Size             File name
   -------------------------------------------------------------------------
   26-Feb-2003  03:41  2000.80.777.0      29,244 bytes  Dbmslpcn.dll     
   08-Feb-2003  05:43                    786,432 bytes  Distmdl.ldf
   08-Feb-2003  05:43                  2,359,296 bytes  Distmdl.mdf
   30-Jan-2003  01:55                        180 bytes  Drop_repl_hotfix.sql
   01-Feb-2003  00:32  2000.80.763.0   1,557,052 bytes  Dtsui.dll        
   30-Jan-2003  05:18                    746,470 bytes  Instdist.sql
   30-Jan-2003  01:55                      1,402 bytes  Inst_repl_hotfix.sql
   08-Feb-2003  06:40  2000.80.765.0      90,692 bytes  Msgprox.dll      
   08-Feb-2003  03:53                  1,065,895 bytes  Replmerg.sql
   08-Feb-2003  06:40  2000.80.765.0     221,768 bytes  Replprov.dll     
   08-Feb-2003  06:40  2000.80.765.0     307,784 bytes  Replrec.dll      
   07-Mar-2003  05:02                  1,084,369 bytes  Replsys.sql
   03-Mar-2003  17:18                    104,958 bytes  Sp3_serv_uni.sql
   19-Mar-2003  18:20  2000.80.789.0      28,672 bytes  Sqlevn70.rll
   28-Feb-2003  01:34  2000.80.778.0     176,696 bytes  Sqlmap70.dll     
   08-Feb-2003  06:40  2000.80.765.0      57,920 bytes  Sqlrepss.dll     
   19-Mar-2003  18:23  2000.80.789.0   7,540,820 bytes  Sqlservr.exe     
   08-Feb-2003  06:40  2000.80.765.0      45,644 bytes  Sqlvdi.dll       
   26-Feb-2003  03:41  2000.80.777.0      29,244 bytes  Ssmslpcn.dll     
   26-Feb-2003  03:41  2000.80.777.0      82,492 bytes  Ssnetlib.dll     
   17-Mar-2003  14:49                    727,132 bytes  Sysmessages.sym
   28-Feb-2003  01:34  2000.80.778.0      98,872 bytes  Xpweb70.dll      


				
NOTE: Because of file dependencies, the most recent hotfix or feature that contains the files may also contain additional files.

WORKAROUND

To work around this problem, follow these steps:
  1. Use the ALTER PROCEDURE statement to change the xp_execresultset Transact-SQL command and the sp_execresultset Transact-SQL command after you turn the ANSI_NULLS setting to ON.
  2. Run the sp_vupgrade_replication stored procedure to re-create the merge stored procedures with the correct ANSI_NULLS setting.

STATUS

Microsoft has confirmed that this is a problem in the Microsoft products that are listed in the "Applies to" section.This problem was first corrected in Microsoft SQL Server 2000 Service Pack 4.

REFERENCES

For more information, see the "Resolving Indexes on Views" topic in SQL Server Books Online.

Properties

Article ID: 816780 - Last Review: February 27, 2014 - Revision: 5.1
APPLIES TO
  • Microsoft SQL Server 2000 Service Pack 3
Keywords: 
kbnosurvey kbarchive kbbug kbfix kbqfe kbsqlserv2000presp4fix kbhotfixserver KB816780

Give Feedback

 

Contact us for more help

Contact us for more help
Connect with Answer Desk for expert help.
Get more support from smallbusiness.support.microsoft.com