DDL Triggers and SET options
I have just had an unforgettable experience with DDL triggers and, as far as I see on Google search, I'm not alone. DDL triggers, as you know, fire stored procedure in a response to server or database DDL events, like metadata or security changes. We use them to track changes on publishing server (those changes that replication cannot take care of) and apply them on subscriber. So, DDL triggers procedure writes statement into Statement table and other process later is executing them on subscriber. Here is a code of DDL trigger and statements logging table below. ################################################################################ SET ANSI_NULLS ON GO SET QUOTED_IDENTIFIER ON GO CREATE TABLE dbo . DDLOutput ( ID int IDENTITY ( 1 , 1 ) NOT NULL, DateAdded datetime NULL, EventType nvarchar ( 255 ) NULL, DatabaseName sysname NULL, ...