Click here to Skip to main content
15,893,668 members
Please Sign up or sign in to vote.
1.00/5 (1 vote)
See more:
Hi,

Can i trace the all necessary details of user by whom my sql table data is modified.

My table records is getting updated unacceptably so i need to create a log to trace the user or job details by which my table is getting updated or modified eighter by link server or other application.

What I have tried:

I CRAETED TRIGGER BUT NOT WORKING CORRECTLY.
Posted
Updated 17-Oct-19 2:36am
Comments
Richard MacCutchan 17-Oct-19 5:43am    
Have you looked at the server logs?

If you have unauthorized changes being made to the database, this is going to come down to poor database security.

If your application is allowing these changing, whether or not you catch this person is going to depend on how your application connects to the database. If it's a single username specified in the connection string, you're not going to be able to tell who is making the changes, from the database side anyway, because all changes are made by the same user, the one you specified in the connection string.

If, on the other hand, everyone connects to the database using their Windows account, then its possible.

Or, are they making changes using a database tool? Identifying the user will only be possible depending on the account used by the tool to login to the database. If someone is using a generic admin account, like "sa", you're never going to find this person.

Again, this comes down to poor security practices.
 
Share this answer
 
ExpressProfiler might be useful:
free-tools-for-sql-server~expressprofiler[^]
 
Share this answer
 

This content, along with any associated source code and files, is licensed under The Code Project Open License (CPOL)



CodeProject, 20 Bay Street, 11th Floor Toronto, Ontario, Canada M5J 2N8 +1 (416) 849-8900