I am running a log parser to find SQL errors in my log files. If the search string (regular expression) is evaluated to true, the line will be marked. So far I used the search expression "SQL0", which was given to me by our DBAs. However, I recently discovered that there are noteworthy SQL Errors that start with "SQL1".
I found some references, that negative SQL error codes mean that the statement was unsuccessful. So my current idea is to search for "SQL[0-9]+N" (SQL error messages were the number ends with an N). Will this find all SQL error codes?
Update: I am running automated scripts on a DB2 database. I need to parse the logs of these scripts to verify if errors occurred during execution.