Use SQL Trace to capture database errors
This is a link to previous related posts that you may find interesting https://sqlserverutilities.com/maximize-sql-trace/ https://sqlserverutilities.com/use-sql-trace-to-capture-database-exceptions/ If we want to capture all the commands being sent