Thor Logo dbatools

Trigger

Find-DbaTrigger

Claudio Silva (@ClaudioESSilva)

Find-DbaTrigger View Source Claudio Silva (@ClaudioESSilva) Windows, Linux, macOS On this page: Synopsis · Description · Syntax · Examples · Parameters · Outputs Synopsis Searches trigger code across server, database, and object levels for specific text patterns or regex matches. Description Searches through SQL Server trigger definitions to find specific text patterns, supporting both literal strings and regular expressions. Examines triggers at three levels: server-level triggers, database-level DDL triggers, and object-level DML triggers on tables and views.

Read more

Get-DbaDbObjectTrigger

Claudio Silva (@claudioessilva), claudioessilva.eu

Get-DbaDbObjectTrigger View Source Claudio Silva (@claudioessilva), claudioessilva.eu Windows, Linux, macOS On this page: Synopsis · Description · Syntax · Examples · Parameters · Outputs Synopsis Retrieves triggers attached to tables and views across SQL Server databases. Description Retrieves all DML triggers that are attached to tables and views within specified databases. This function helps DBAs inventory trigger-based business logic, identify potential performance bottlenecks, and document database dependencies. You can filter results by database, object type (tables vs views), or pipe in specific objects from Get-DbaDbTable and Get-DbaDbView.

Read more

Get-DbaDbTrigger

Chrissy LeMaire (@cl), netnerds.net

Get-DbaDbTrigger View Source Chrissy LeMaire (@cl), netnerds.net Windows, Linux, macOS On this page: Synopsis · Description · Syntax · Examples · Parameters · Outputs Synopsis Retrieves database-level DDL triggers from SQL Server instances for security auditing and change tracking analysis. Description Retrieves all database-level DDL triggers from one or more SQL Server instances. Database triggers fire in response to DDL events like CREATE, ALTER, or DROP statements within a specific database, making them useful for change auditing and security monitoring.

Read more

Get-DbaInstanceTrigger

Chrissy LeMaire (@cl), netnerds.net

Get-DbaInstanceTrigger View Source Chrissy LeMaire (@cl), netnerds.net Windows, Linux, macOS On this page: Synopsis · Description · Syntax · Examples · Parameters · Outputs Synopsis Retrieves server-level DDL triggers from SQL Server instances for auditing and documentation Description Returns server-level DDL triggers that monitor and respond to instance-wide events like CREATE, ALTER, and DROP statements. Server triggers are commonly used for security auditing, change tracking, and preventing unauthorized schema modifications across all databases on an instance.

Read more

Get-DbaModule

Brandon Abshire, netnerds.net

Get-DbaModule View Source Brandon Abshire, netnerds.net Windows, Linux, macOS On this page: Synopsis · Description · Syntax · Examples · Parameters · Outputs Synopsis Retrieves database modules (stored procedures, functions, views, triggers) modified after a specified date Description Queries sys.sql_modules and sys.objects to find database modules that have been modified within a specified timeframe, helping DBAs track recent code changes for troubleshooting, auditing, or deployment verification. Essential for identifying which stored procedures, functions, views, or triggers were altered during maintenance windows or after application deployments.

Read more