Sql Server Triggers: Get list of Updated columns in Trigger


— ————————————————————————————————————– — Get the table id of the trigger — DECLARE @idTable INT SELECT @idTable = T.id FROM sysobjects P JOIN sysobjects T ON P.parent_obj = T.id WHERE P.id = @@procid — Get COLUMNS_UPDATED if update — DECLARE @Columns_Updated VARCHAR(50) SELECT @Columns_Updated = ISNULL(@Columns_Updated + ‘, ‘, ”) + name FROM syscolumns WHERE id… Read More Sql Server Triggers: Get list of Updated columns in Trigger

SQLAuthority Article : SQL SERVER – Fix: Error: 15138 – The database principal owns a schema in the database, and cannot be dropped


SQL SERVER – Fix: Error: 15138 – The database principal owns a schema in the database, and cannot be dropped Thanks to SQL Authority & Author Pinal Dave for such a nice article. – Workaround / Resolution / Fix: Let us assume that user was trying to delete user which is named as ‘pinaladmin’ and it… Read More SQLAuthority Article : SQL SERVER – Fix: Error: 15138 – The database principal owns a schema in the database, and cannot be dropped