September 8, 2005 at 12:25 pm
Hi Friends!
I want to audit all DDL (Create, alter, drop...) statements on my databases in a SQL 2000 SP3a server.
I thought that the best solution is to create triggers for this, but how can i do this? I have read this is possible on SQL2005, but no idea in SQl2k
Is there a way to implement in SQL 2000?
Thanks all
September 8, 2005 at 12:54 pm
DDL triggers are new in SQL 2005. The only triggers available for SQL 200 are DML (INSERT/UPDATE/DELETE). You can however use sp_trace_setevent see BOL. Eventid 46 is Object created and Eventid 47 is object dropped.
See also http://www.sqlservercentral.com/columnists/hji/trace.asp or http://www.sqlservercentral.com/columnists/losmith/automatedtracefilecollection.asp
for ideas on automating this
Francis
Viewing 2 posts - 1 through 1 (of 1 total)
You must be logged in to reply to this topic. Login to reply