I have an SqlTimeout that is happening.
I test what I 'believe' the sql actually is in production and it seems to work fine for me - but I am not quite sure what the actual SQL statement is that is executed. (Parameters and all)
I would like to log that in production. I short when an SqlException is thrown - I would like to be able to access the query text that was executed.
I have tools like RedGate Sql Monitor - but the command is 'canceled' by the client - so does not show up. I also cannot run your profiler in production.
Would like to just catch this exception or turn on some logging for just a single query or really, just be able to log when the exception happens.
Any ideas or thoughts?