I am trying to add a trigger on a production database table which includes millions of rows and is used very heavily. There are around 70k-100k inserts per day.
When I try to add a trigger to this table, SQL Server takes too much time - until I stop the execution or SQL Server throws a deadlock error.
I need to run this trigger on production. How can I add a trigger with minimal impact on running the production database?
The trigger is just inserting a record in a audit table 100% similar to https://www.mssqltips.com/sqlservertip/5909/sql-server-trigger-example/