I've been trying on this one for a while. I implemented change data capture, but I found interpreting some of the columns difficult (even after reading through several articles online). Since I only need to track deletes on one or two tables, I decided to try an on delete sql trigger. Well, I'm having a hard time with this one too.
Here is what I would like to capture:
1. The row that was deleted
2. When the row was deleted
3. What user deleted the row
Here is some sample data for anyone that can lend a hand. Thanks for any help!
CREATE TABLE #attend
INSERT INTO #attend (attendID, lname, fname)
(1, 'Smith', 'Joe'),
(2, 'Black', 'Sam'),
(3, 'Williams', 'Ralph');
EDIT: I guess I should note that specifically I'm having a hard time with capturing which user did the deleting.