title: After Delete Trigger Fires Only After Delete?
body: <p>I thought "after delete" meant that the trigger is not fired until after the delete has already taken place, but here is my situation...</p>
  
  <p>I made 3, nearly identical SQL CLR after delete triggers in C#, which worked beautifully for about a month. Suddenly, one of the three stopped working while an automated delete tool was run on it.</p>
  
  <p>By stopped working, I mean, records could not be deleted from the table via client software. Disabling the trigger caused deletes to be allowed, but re-enabling it interfered with the ability to delete.</p>
  
  <p>So my question is 'how can this be the case?' Is it possible the tool used on it futzed up the memory? It seems like even if the trigger threw an exception, if it is AFTER delete, shouldn't the records be gone?</p>
  
  <p>All the trigger looks like is this:</p>
  
  <pre><code>ALTER TRIGGER [sysdba].[AccountTrigger] ON [sysdba].[ACCOUNT]  AFTER  DELETE AS 
  EXTERNAL NAME [SQL_IO].[SQL_IO.WriteFunctions].[AccountTrigger]
  GO
  </code></pre>
  
  <p>The CLR trigger does one select and one insert into another database. I don't yet know if there are any errors from SQL Server Mgmt Studio, but will update the question after I find out.</p>
  
  <p>UPDATE:</p>
  
  <p>Well after re-executing the same trigger code above, everything works again, so I may never know what if any error SSMS would give.</p>
  
  <p>Also, there is no call to rollback anywhere in the trigger's code.</p>