PRB: ANSI Warnings May Incorrectly Show Replication Agents As Failed (304535)
The information in this article applies to:
- Microsoft SQL Server 2000 (all editions)
This article was previously published under Q304535 SYMPTOMS
The Replication Monitor reports that an agent has failed if the replication process encounters ANSI_WARNINGS. The error message that the agent reports is dependent upon the ANSI warning that occurs; therefore, the error message varies. If an error message occurs, you may find that data has actually synchronized successfully. This behavior may occur if:
CAUSE
All the replication agents are defined as SQL Server Agent jobs. By design, SQL Server Agent jobs return a failure status if they encounter an error message or a warning. For this reason, replication agents show a failure status if they encounter an ANSI Warning.
WORKAROUND
To work around this behavior, use any of these methods:
- Investigate and avoid a situation in which an ANSI warning might occur.
-
Set ANSI_WARNINGS to OFF on the trigger, or find a way to set ANSI_WARNINGS to OFF on the client that calls the trigger.
SQL Server 2000 and prior SQL Server versions do not have an option that allows you to set ANSI warnings OFF for the replication agents (that is, the Snapshot Agent, Distribution Agent and Merge Agent).
Therefore, the only way other than to eliminate the cause of the warning is to suppress the warning. To suppress the warning, add a SET ANSI_WARNINGS OFF statement in the trigger definition. Note that suppressing the warning may cause unexpected results. Therefore, you need to thoroughly investigate any possible results before you set ANSI_WARNINGS to OFF.
Modification Type: | Major | Last Reviewed: | 10/3/2003 |
---|
Keywords: | kbprb KB304535 |
---|
|