HiveBrain v1.2.0
Get Started
← Back to all entries
patternMinor

Getting Machine name from where stored procedure was last executed

Submitted by: @import:stackexchange-dba··
0
Viewed 0 times
storedlastwheregettingprocedurewasexecutednamemachinefrom

Problem

Is there any way to find out machine IP or machine name from where a particular stored procedure is executed in SQL Server 2005?

We have a client server architecture with .NET as a front end and SQL Server 2005 as back end. Someone in production environment has executed one stored procedure & deleted critical data from .NET application. We are unable to deduce who has done this.

We know the exact time when this has happened. Is there any way we can find the all the connection in SQL Server at that time, so that we can find out machine name from logged connection?

Solution

If the database is in full recovery mode and you are doing periodic log backups then you can find the login that deleted the data, and the exact moment the data was deleted. Read How to read and interpret the SQL Server log. Also, with a proper backup strategy in place, it will be trivial to recover the deleted data as well.

On the other hand, if you do not have a proper backup strategy in place, then you well deserve to loose this data and more.

Context

StackExchange Database Administrators Q#96227, answer score: 2

Revisions (0)

No revisions yet.