Best Practices - Stored Procedure Logging
- by hgulyan
If you have a long running SP, do you log somehow it's actions or just wait for this message?
"Command(s) completed successfully."
I assume, that there can be plenty solutions on this subject, but is there any best practice - a simple solution that is frequently used?
EDIT
I've found an interesting link on this subject
http://weblogs.sqlteam.com/brettk/archive/2006/09/21/12391.aspx
Article describes using a log table, but there's an issue
The logging procedure must be executed outside of any transaction
I can't call that insert outside, because of cursor that I use and insert a line to that table on every row.
Any ideas?