Problem solve Get help with specific problems with your technologies, process and projects.

Using Microsoft SQL Server triggers

Not sure why or when to use SQL Server triggers? This series breaks down the basics, including design considerations and performance issues, and shows examples of triggers.

Intro | Part 1 | Part 2 | Part 3 | Part 4 | Part 5 | Part 6 | Part 7

One of my clients called me. The frantic communication went something like this:

"Our applications started to do crazy things in the database," said the client. "We don't understand what is happening. New rows are added to one table and another table is changed. We successfully update a row, and when we refresh the application form, different data appears. Also, it takes too long to update a single row. Is it a virus? Can it be that SQL Server has a bug in it?"

I examined their database. Almost every table had at least one trigger attached to it. I tried to follow the logic of only one update, and I was terrified. It took me hours to understand the logic of this "spaghetti" database. At least the "recursive triggers" option was disabled. Imagine what could happen if it wasn't? I would have lost several more hours.

This is the ultimate dilemma: Should you use triggers in SQL Server? What are the implications? Will database triggers affect SQL Server performance and by how much? In this tip, I pinpoint some considerations for using triggers in SQL Server.

Explore Microsoft SQL Server triggers


Michelle Gutzait works as a team member of the SQL Server Database Experts at, a worldwide company providing Remote Administration services for databases, operating systems, SANs and networks. Gutzait has been involved in IT for 20 years as a developer, business analyst and database consultant. For the past 10 years, she has worked exclusively with SQL Server. Her skills include SQL infrastructure and database design, performance tuning, security, high availability, disaster recovery, very large databases, replication, T-SQL coding, DTS/SSIS packages, administrative and infrastructure tools development, reporting services and more.

Dig Deeper on Microsoft SQL Server Performance Monitoring and Tuning