DF027: The RAISERROR statement with the NOWAIT option is used in trigger.
Last modified: December 25, 2024
The topic describes the DF027 T-SQL code analysis rule.
Category
PERFORMANCE
Message
The RAISERROR statement with the NOWAIT option is used in trigger.
Description
Do not use the RAISERROR statement with the NOWAIT option in triggers to avoid performance issues.
Additional information
This rule allows triggers to raise custom error messages without causing the calling process to wait for acknowledgment before continuing execution.
Noncompliant code example
CREATE OR ALTER TRIGGER DemoTrigger
ON dbo.DemoTable
FOR INSERT
AS BEGIN
RAISERROR('',10,-1) WITH NOWAIT;
END
GO
Compliant solution
CREATE OR ALTER TRIGGER DemoTrigger
ON dbo.DemoTable
FOR INSERT
AS BEGIN
RAISERROR('',10,-1);
END
GO
Was this page helpful?
Want to find out more?
Overview
Take a quick tour to learn all about the key benefits delivered by dbForge Studio for SQL Server.
All features
Get acquainted with the rich features and capabilities of the tool in less than 5 minutes.
Request a demo
If you consider employing this tool for your business, request a demo to see it in action.