SA0098 : The results from triggers are currently allowed. Consider disabling results from triggers

The topic describes the SA0098 analysis rule.

Message

The results from triggers are currently allowed. Consider disabling results from triggers

Description

The rule checks the if the ‘Disallow results from triggers’ option be set to ON.

The rule reports warning if your server is currently configured to allow triggers to return result sets.

How to fix

Consider setting the ‘Disallow results from triggers’ option be set to OFF after reviewing considerations:

  • If your database applications are making use of this feature, it may be undesirable to change this setting.

  • If you use result sets to as an aid when testing or debugging triggers.

The following error message will be given when this option is set to ON and a result set is returned from a trigger:

Msg 524, Level 16, State 1, Procedure <Procedure Name>, Line <Line#> – A trigger returned a resultset and the server option ‘disallow_results_from_triggers’ is true.

Scope

The rule has a ContextOnly scope and is applied only on current server and database schema.

Parameters

Rule has no parameters.

Remarks

The rule requires SQL Connection. If there is no connection provided, the rule will be skipped during analysis.

Effort To Fix
20 minutes per issue.
Categories

Design Rules, Bugs

Additional Information
See Also

Other Resources