Improve sql monitoring exceptions.