Building and Optimizing Triggers in SQL Server

Start Free Preview

Buying via our links supports this free directory · Affiliate disclosure.
Course facts
  • Payment: Free Preview (Paid Upgrade)
  • Learning style: Self-paced, start anytime
  • Format: Text & Interactive
  • Video access: Streaming Only
  • Before you start: Intermediate SQL Server
DataCamp details
  • Chapters: 4
Created byDataCamp
Available onDataCamp

Course Details
Learning Style

Start Anytime

Level

Intermediate

Study Mode

100% Online

Duration

Short (< 10 Hours)

Languages
Audio Language

English

Outcomes
Certificate

Certificate of Completion

Price & Terms
Pricing Model

Free Preview (Paid Upgrade)

Technical
Content Medium

Text & Interactive

Video Access

Streaming Only

Specification
Access

Subscription

SKU: building-optimizing-triggers-sql-server Category: Tags: , , Brand:

Build SQL Server triggers in T-SQL to audit data changes and block unwanted edits, then manage and troubleshoot them, with interactive exercises.

At a glance
Duration4 hrs
LevelIntermediate
CertificateCertificate of Completion
LanguageEnglish
AccessSubscription
Add your review
Add to wishlistAdded to wishlistRemoved from wishlist 0
Add to compare

SQL Server triggers are a kind of stored procedure that runs automatically when rows change, tables are altered or users log on. That gives database teams a way to audit activity and hold data to consistent rules. Working in T-SQL, you write triggers that record changes, refuse unwanted updates and deletions, and check stock before an order goes through. You then weigh their known limitations against other options and keep existing triggers under control.

What You Will Achieve

  • Build a trigger that keeps a history of row changes for auditing
  • Use INSTEAD OF triggers to block unwanted edits or check stock before an order is placed
  • Weigh a trigger against a stored procedure or a computed column before choosing one
  • Spot a trigger that is causing trouble, then switch it off, change it or drop it


Program Overview

Trigger Basics and Alternatives

Introduces what a trigger is, walks through writing one in T-SQL and compares triggers with other database objects.

  • Types of trigger and a first trigger
  • How DML triggers track data changes
  • Triggers vs. stored procedures and computed columns

Trigger Types, Limitations and Use Cases

Works through each kind of trigger SQL Server offers, then sets their known limitations beside common auditing and prevention uses.

  • AFTER and INSTEAD OF triggers (DML)
  • DDL triggers and logon triggers
  • Known limitations and a report on existing triggers
  • Table auditing, database auditing and preventing server changes

Trigger Optimization and Management

Handles the upkeep of triggers already in place and the investigation of ones that misbehave.

  • Deleting, altering, disabling and re-enabling triggers
  • Managing and counting existing triggers
  • Tracking trigger executions and identifying problematic triggers

Certificate Awarded (Paid)


Job Outlook

Trigger skills apply in database development and administration on SQL Server, where teams audit changes to tables, protect data from unwanted edits or deletions, and secure logins.


Our take

Good for: Database developers and DBAs on SQL Server who need to audit data changes or guard tables and servers against unwanted edits.

Keep in mind: All examples use T-SQL on SQL Server. Despite the intermediate label, the first chapter starts with what a trigger is and how to create one.

Bottom line: A focused course that pairs each SQL Server trigger type with auditing and prevention exercises, then shows how to manage and troubleshoot triggers already running.

Frequently Asked Questions

Which kinds of SQL Server triggers does it teach?

It teaches AFTER and INSTEAD OF triggers for data changes, DDL triggers for changes to tables and the server, and logon triggers. Examples include tracking retired products, preventing updates to orders, stopping table deletion and tightening database security at login.

What alternatives to triggers does the course compare?

The opening chapter looks at trigger alternatives, comparing triggers with stored procedures and with computed columns. A later chapter sets out the known limitations of triggers and has you build a report on the triggers that already exist in a database.

How do you track down a trigger that causes problems?

The final chapter covers troubleshooting: keeping a record of when triggers execute, identifying problematic ones, and counting the AFTER triggers in place. You also practice disabling a trigger, re-enabling it, altering its definition and removing it.

User Reviews

0.0 out of 5
★★★★★
0
★★★★★
0
★★★★★
0
★★★★★
0
★★★★★
0

No reviews yet. Be the first to review this course.

There are no reviews yet.

Write your review

Reviews can only be posted by registered learners. Log in, then you will return here to post.

×

    Report this page
    Building and Optimizing Triggers in SQL Server
    Building and Optimizing Triggers in SQL Server
    LiveTalent
    Logo
    Compare items
    • Total (0)
    Compare
    0