General discussion


Activity tracking on SQL Server

By simpleyanish ·
My problem is that job history for some of jobs created is being deleted by self or by someone.

Is there any way we can capture all the activities automatically on SQL Server ?
e.g users who logged in and out, activities done by them,time they worked for ,databases they worked on,statements they executed etc

This conversation is currently closed to new comments.

Thread display: Collapse - | Expand +

All Comments

Collapse -

by Tony Hopkinson In reply to Activity tracking on SQL ...

Not sure you need all that.
Create a table for storing the logging data.
eg JobNumber, DateActioned ,UserName
Add an on delete trigger to the jobs table and in it
do an insert into your logging table with the required data. Should give you an idea of what your dbms thinks it's being told to do.

Related Discussions

Related Forums