• Great question, Mounika. Thanks!

    The design choice to make DDL triggers fire after the event has many consequences. This question points out one (and one that can be very easy to overlook; I am actually surprised that a total of 32% (at this time) of the answer is correct).

    But there are other consequences as well. Some people have tried to use DDL triggers to prevent people who otherwise do need DDL permissions from making specific changes that can affect performance (big allocations or deallocations, schema stability locks that are kept for a long time, etc). It didn't work. The triggers do not actually prevent these changes, they allow them to happen, then check and if the triggers thinks the change should not have been made, it will be rolled back - costing even more resources!

    I will not hold my breath for it - but I think that it would be great if Microsoft could give us an option to make DDL trigers fire *before* the change.


    Hugo Kornelis, SQL Server/Data Platform MVP (2006-2016)
    Visit my SQL Server blog: https://sqlserverfast.com/blog/
    SQL Server Execution Plan Reference: https://sqlserverfast.com/epr/