SQL Server Logs – How to Insert Fail Logs

logssql server

Is there a way to view fail inserts to a SQL Server database? I am seeing that a number of my inserts are failing and I'd like to recover that data if it's possible.

Best Answer

No, SQL Server does not log failed transactions, and that data is gone.

You need to implement error handling. This would be a tip of the iceberg question, but here are some links for you to read.

Come back and ask a new question if you have some specific problem implementing your own logging of failed inserts.