Thanks for the info. When i execute any query or procedure with any syntax error, then the QueryAnalyser gives the error details from "sysmessages" table along with the procedure name, line etc. I wonder how Query Analyser is able to corelate the error messages and executed procedure. This made me curious to know, more about the storage of compilation results.
Originally posted by hmscott
To the best of my knowledge there isn't an exact equivalent to what you are looking for in SQL. Serious errors are (above State 17?) are thrown into SQL's error log (in EM under Management).
You can start a trace file using SQL Profiler or using a stored procedure to log selected events (including errors) to a table or a file (or in the case of SQL Profiler, to the screen).