The topic describes the DF027 T-SQL code analysis rule.
PERFORMANCE
The RAISERROR statement with the NOWAIT option is used in trigger.
Do not use the RAISERROR statement with the NOWAIT option in triggers to avoid performance issues.
This rule allows triggers to raise custom error messages without causing the calling process to wait for acknowledgment before continuing execution.
CREATE OR ALTER TRIGGER DemoTrigger
ON dbo.DemoTable
FOR INSERT
AS BEGIN
RAISERROR('',10,-1) WITH NOWAIT;
END
GO
CREATE OR ALTER TRIGGER DemoTrigger
ON dbo.DemoTable
FOR INSERT
AS BEGIN
RAISERROR('',10,-1);
END
GO