Is there any way to raise an alert on a specific exception for SQL queries ?
In general there is no way to raise an alert based on an exception.
Error detection will increment the Errors Per Interval and report detailed error information into the errors tab.
As per the error detection documentation, there are ways to detect errors and create methods from them, but it is based on the class/method, not the exception itself.
Release : 10.7.0
Component : APM Agents
A enhancement has been raised for this, DE501018