Click here to Skip to main content
15,886,067 members
Please Sign up or sign in to vote.
0.00/5 (No votes)
Hi,

Is it possible to find who altered last time a particular ROW of a table last time ?
Is it possible to find who are the user logged into database and executed some SP last time ?
Is it possible who are connect to LIVE database from LOCAL system on a particular day ?



Many many Thanks
Posted

Assuming that you don't mean to record the information yourself, but want SQL server to do it for you, have a look here: Auditing in SQL Server 2008[^] - it may not be exactly what you want to know, but it shoudl at least get you up to speed with want questions you need at ask!
 
Share this answer
 
Hi,
You can add two extra columns in table which will capture the last modified user and last modified time. You have to pass the logined user name and updated time to the data base while updating the table.
Thank You
 
Share this answer
 
Hi,

You can add two extra columns in table which will capture the last modified user and last modified time. You have to pass the logined user name and updated time to the data base while updating the table.

Thank You
 
Share this answer
 
Comments
Adarsh chauhan 4-Jul-13 1:24am    
Hi Zukiari,
your solution will work in case if data is being updated/inserted using some GUI as you can capture login id and save that in table as modified by. But what if user is updating table records using sql queries?? as you cant assume user will always pass his correct info.. is there any way to find it using any sql functionality(any built in func or sp)?? I dont have any clue about it so just asking...
Jitendra Ku. Sahoo 5-Jul-13 3:30am    
Agree on you comment Adarsh.
Things have already modified.How can I track it now ?

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