New Function Get-DbaDbObjectTrigger & Improve Find-DbaTrigger#5570
New Function Get-DbaDbObjectTrigger & Improve Find-DbaTrigger#5570potatoqualitee merged 15 commits intoprereleasefrom
Conversation
functions/Get-DbaDbObjectTrigger.ps1
Outdated
| process { | ||
| foreach ($Instance in $SqlInstance) { | ||
| $InputObject += Get-DbaDbTable -SqlInstance $SqlInstance -SqlCredential $SqlCredential -Database $Database -ExcludeDatabase $ExcludeDatabase | ||
| $InputObject += Get-DbaDbView -SqlInstance $SqlInstance -SqlCredential $SqlCredential -Database $Database -ExcludeDatabase $ExcludeDatabase |
There was a problem hiding this comment.
With the number of tables and views that can be in data warehouse systems I think we should offer up the ability to only retrieve one or the other. Get-DbaDbObjectTrigger ...-Type Table or -Type View ?
There was a problem hiding this comment.
An alternative would be to accept piping from Get-DbaDbTable or Get-DbaDbView
There was a problem hiding this comment.
An alternative would be to accept piping from Get-DbaDbTable or Get-DbaDbView
There was a problem hiding this comment.
Thanks Shawn & Patrick. Will definitely add the -Type identical to Find-DbaTrigger and see the piping from Get-*Table/View.
functions/Get-DbaDbObjectTrigger.ps1
Outdated
| function Get-DbaDbObjectTrigger { | ||
| <# | ||
| .SYNOPSIS | ||
| Get all existing database triggers on one or more SQL instances. |
There was a problem hiding this comment.
Need to update references to database triggers to be object-level triggers
There was a problem hiding this comment.
Thanks Shawn! Will update tonight.
|
@potatoqualitee @wsmelton @sqllensman |
|
mmm you will need to recreate your branches, it's super messed up - 1283 files modified. Please copy your changed files to a diff directory, get latest prerelease, rebranch then try again. Going to close, please feel free to reopen this PR if you can fix it, otherwise, I will wait for the updated PR. |
|
There is only 3 changes for the PR. |
|
my last commit must have worked but not showed up, thanks for rechecking 💯 will merge when tests pass |
|
The branch failure is n/a as the PR test was successful. Since it is reopened it will have to run both again. |
|
thanks so much for the new function! 🙇 gonna do a mass function comparison towards the end and add all new commands at once to psd1/psm1 |
|
boooom 💣 |
Type of Change
Purpose
new function
Get-DbaDbObjectTriggerthat search for triggers on object level. This means Tables and ViewsAlso improved the
Find-DbaTriggerto include triggers on views.Motivation: https://twitter.com/TheRockstarDBA/status/1129059763373912065?s=01
Approach
Commands to test
Get-DbaDbObjectTriggerFind-DbaTriggerScreenshots
Learning