Here's an example from Books Online adapted for your audit table. I changed your table a little because the definition you have will not hold everything you want correctly. Also, note that DDL can be issued against more than just tables, so you may want to change the name of your column to object_name. This will record everything in the audit table.create table audit_ddl(login_user varchar(20),login_time datetime,table_name nvarchar(100),action_performed nvarchar(2000) );GOCREATE TRIGGER log ON DATABASE FOR DDL_DATABASE_LEVEL_EVENTS ASDECLARE @data XMLSET @data = EVENTDATA()INSERT audit_ddl (login_user, login_time, table_name, action_performed) VALUES (CONVERT(nvarchar(100), CURRENT_USER), GETDATE(), @data.value('(/EVENT_INSTANCE/ObjectName)[1]', 'nvarchar(100)'), @data.value('(/EVENT_INSTANCE/TSQLCommand)[1]', 'nvarchar(2000)') ) ;Here's how you can prevent certain operations and log them too:CREATE TRIGGER safety ON DATABASE FOR ALTER_TABLE, DROP_TABLEAS PRINT 'ALTER or DROP TABLE Issued.' DECLARE @data XMLSET @data = EVENTDATA()INSERT audit_ddl (login_user, login_time, table_name, action_performed) VALUES (CONVERT(nvarchar(100), CURRENT_USER), GETDATE(), @data.value('(/EVENT_INSTANCE/ObjectName)[1]', 'nvarchar(100)'), @data.value('(/EVENT_INSTANCE/TSQLCommand)[1]', 'nvarchar(2000)') ) RAISERROR ('Tables cannot be altered or dropped in this database.', 16, 1) ROLLBACK;