We need to debug a MS SQL Server 2014 deadlock situation. We got our deadlock graph, but the statement seems to contain the string "password", so the SQL is obfuscated ("*password---..."). Is there a way to turn this behaviour off and get the actual statement?

1 Answer 1


No, there is no trace flag or way to override this behavior.

If any statement has a restricted word in it, it will be overwritten with "-------" or "** restricted **". This is the same whether it is a trace, in cache, or using XEvents.

  • The only other option you have is to either to a packet capture or use some other type of TDS interceptor. Both have their limitations and downfalls. Commented Apr 4, 2016 at 19:53
  • Do you know where it states this in BOL? Commented Apr 4, 2016 at 22:07
  • @KennethFisher What, specifically, are you looking for in the statement? I don't believe there is a BOL article about it. an you give me an example? Commented Apr 5, 2016 at 16:10
  • I was hoping you knew of a place in BOL where it discusses that behavior. A list of restricted words and the fact that you get the "-----" result. Just a curiosity thing. Commented Apr 5, 2016 at 16:14
  • @KennethFisher Is this something that would be helpful? If so, let me know and I'll see what I can do. Commented Apr 5, 2016 at 16:37

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service and acknowledge you have read our privacy policy.

Not the answer you're looking for? Browse other questions tagged or ask your own question.