New April Hotfix and more changes for VAT
Check out the latest updates to Microsoft Dynamics GP 2016 and 2018.
Dynamics 365 2019 release wave 2 plan Discover the latest updates to Dynamics 365.Release Plan | Weekly Deployment Notes
Ace your Dynamics 365 deployment with packaged services delivered by expert consultants.Explore service offerings
Connect with the ISV success team on the latest roadmap, developer tool for AppSource certification, and ISV community engagements.
ISV self-service portal
The FastTrack program is designed to help you accelerate your Dynamics 365 deployment with confidence.
FastTrack Program | Finance and Operations TechTalks | Customer Engagement TechTalks | Talent TechTalks
In the last post, I posted a SQL script which could be used to find a column in the database. This post has a SQL script which can be used to locate triggers in all databases.
Change the highlighted section to the name of the trigger you’re looking for and run the script.
This is not something I am going to do manually, so I wrote a script which would find all tables containing the specified column (change the highlighted section):
Created by Ian Grieve of azurecurve|Ramblings of a Dynamics GP Consultant (http://www.azurecurve.co.uk)
This code is licensed under the Creative Commons Attribution-NonCommercial-ShareAlike 2.0 UK: England & Wales (CC BY-NC-SA 2.0 UK).
DECLARE @command nvarchar(max)
DECLARE @Trigger VARCHAR(50) = 'utr_'
SELECT @command = 'IF EXISTS ( SELECT 1 FROM sys.databases WHERE name = ''?'')
DECLARE @stmt nvarchar(max) DECLARE @n char(1) SET @n = char(10)
SELECT DB_NAME() AS ''DB_NAME'',t.name,t.is_disabled FROM sys.triggers AS t
INNER JOIN sys.objects AS o ON o.object_id = t.object_id WHERE o.name LIKE ''' + @Trigger + '%''
EXEC sp_MSforeachdb @command
Read original post Find SQL Trigger In All Databases at azurecurve|Ramblings of a Dynamics GP Consultant
Business Applications communities