question

Chris 2 avatar image
Chris 2 asked

Find actual SQL statement failed in production

Hi, SQL 2012 on Windows 2008R2, an insert failed on production environment. How do I find that INSERT from prod log? Many thanks, Chris
sql-server-2012insertlog
10 |1200 characters needed characters left characters exceeded

Up to 2 attachments (including images) can be used with a maximum of 512.0 KiB each and 1.0 MiB total.

1 Answer

· Write an Answer
Waqar_lionheart avatar image
Waqar_lionheart answered
Hi, AFAIK, failed inserts are not stored in the log. You ll have to introduce error handling. Either introduce this in your insert sp_... or from the application you are using to insert data.
10 |1200 characters needed characters left characters exceeded

Up to 2 attachments (including images) can be used with a maximum of 512.0 KiB each and 1.0 MiB total.

Write an Answer

Hint: Notify or tag a user in this post by typing @username.

Up to 2 attachments (including images) can be used with a maximum of 512.0 KiB each and 1.0 MiB total.