DF027: The RAISERROR statement with the NOWAIT option is used in trigger.

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

Want to Find out More?

Overview

Overview

Take a quick tour to learn all about the key benefits delivered by dbForge Studio for SQL Server.
All Features

All features

Get acquainted with the rich features and capabilities of the Studio in less than 5 minutes.
Request a demo

Request a demo

If you consider employing the Studio for your business, request a demo to see it in action.
Ready to start using dbForge Studio for SQL Server?