Steven Mann (10/2/2008)
In my environment I have 20 databases that are constantly updated 24 hours a day. The application uses one user account so my question has two parts.
1. Can I exclude this user from the trigger?
2. With changes being made constantly is there a way to keep the table size down?
1) In your trigger you can check the login name
SET @loginname = @data.value('(/EVENT_INSTANCE/LoginName)',
IF @loginname != 'appuser'
-- do the work
2) You can implement a job that does cleanup on a regular basis.
We just recently implemented this in our three main databases for one of our applications, logging to a central table (yes Adam, user has the rights =) ) just in our dev environment (we have a strict dev->qa->production process so we really just need to identify/validate which objects need to be pushed for a release). We have not had an opportunity to use it just yet, but seems to be working fine with the testing we have done.