This month's discount Comprehensive Database Performance Health Check · Testimonials
SQLAuthority with Pinal Dave
Home
  • Consulting
    • Health Check
  • Free Videos
  • All Articles
    • AI
    • SQL Performance
    • SQL Tips and Tricks
    • Interview Questions and Answers
    • SQL Puzzle
    • SQL Video
    • SQLAuthority News
    • Personal
  • Books
  • Consulting
A plaster hawk beside one freshly plastered wall patch and one unchanged patch

Comparing Old and New Values in a Trigger With inserted and deleted

October 10, 2018
Pinal Dave
SQL Tips and Tricks
Best Practices, SQL Server, SQL Trigger

Build a small audit trigger that joins inserted and deleted, handles NULL changes correctly and ignores saves that change nothing.

Read More
SQL SERVER - Be Careful with Logon Triggers - Don’t use Host_Name

SQL SERVER – Be Careful with Logon Triggers – Don’t use Host_Name

April 14, 2018
Pinal Dave
SQL Tips and Tricks
SQL Error Messages, SQL Login, SQL Scripts, SQL Server, SQL Trigger, Starting SQL

A reader used HOST_NAME() in a logon trigger to limit access. Here is why that is risky, and why Logon Triggers can lock everyone out if you are not careful.

Read More
Gouache painting of a tall wobbling tower of nested cream and sage ceramic bowls, the smallest bowl on top painted vermilion

Msg 217: Nested Triggers Exceed the 32 Level Limit

January 29, 2018
Pinal Dave
SQL Tips and Tricks
SQL Error Messages, SQL Scripts, SQL Server, SQL Trigger

Msg 217 appears when triggers fire each other past the nesting limit of 32. A reader asked what happens when one trigger calls another. Two AFTER INSERT triggers show it, and both tables stay empty.

Read More
One coat on a single hook by a door, with four wet coats heaped on the floor beneath

Triggers That Assume One Row: Fixing Them for Multi-Row Updates

February 1, 2017
Pinal Dave
SQL Tips and Tricks
SQL Audit, SQL Server, SQL Transactions, SQL Trigger

Fix triggers for multi-row updates by joining inserted and deleted, testing complete audit coverage, and keeping transaction work small.

Read More
Migration feature table.

Oracle to SQL SERVER Migration – Triggers Used While Migration

December 28, 2016
Pinal Dave
SQL Tips and Tricks
Oracle, SQL Migration, SQL Trigger

Moving from Oracle to SQL Server is like switching phones: old habits come along. A client tuning case about the triggers used during the migration.

Read More
SQL SERVER - How to Avoid Triggers for Multiple Row Operations in a Table

SQL SERVER – How to Avoid Triggers for Multiple Row Operations in a Table

October 20, 2016
Pinal Dave
SQL Tips and Tricks
SQL Scripts, SQL Server, SQL Trigger

A late-night mail from an old customer about an application error led to this lesson: how to avoid triggers causing trouble with multiple row operations.

Read More
SQL SERVER - How to Enable or Disable All the Triggers on a Table and Database?

SQL SERVER – How to Enable or Disable All the Triggers on a Table and Database?

September 5, 2015
Pinal Dave
SQL Tips and Tricks
SQL Scripts, SQL Trigger

One line commands to enable or disable all the triggers on a table, a database or the whole server using ENABLE TRIGGER ALL and DISABLE TRIGGER ALL.

Read More
Previous 1 2 3 4 5 6 … 8 Next
  • Books
  • Testimonials
  • Privacy Policy

© 2006 – 2026 All rights reserved. pinal @ SQLAuthority.com