Take the 2-minute tour ×  I'm having a problem with a database,
where it seems a column is updated with a wrong value. At the
moment, I have no idea which program is doing this. What would
be the best way to find this out? Things that could really help
me are, in order of helpfulness:    • The application name   •
the host executing the application   • the exact SQL statement.
Could the transaction log help me here? Can I write a logging
trigger somehow?  Help would be appreciated.  share|improve this
question SQL will only know as much about the calling
application as it is provided with when the connection is
opened. If that information is not provided in the connection
string (explicitly or by default), you won't have it within SQL.
–  Philip Kelley Nov 3 '10 at 13:44 add comment  3 Answers  up
vote 5 down vote accepted  You could create a trigger and a
table, along the lines of      INSERT logtable share|improve
this answer Don't forget getdate(), to track when the update was
attempted! –  Philip Kelley