Sample Header Ad - 728x90

How can I measure the impact of queries with errors being rejected by SQL Server?

0 votes
1 answer
367 views
After configuring XE on November 23, 2020 to capture some errors I could count 2,163,665 occurrences of the same error coming from requests of a legacy app (that probably won’t be corrected so soon). The errors can be classified on the 1st and 2nd steps for [Processing a SQL Statement](https://learn.microsoft.com/en-us/sql/odbc/reference/processing-a-sql-statement?view=sql-server-ver15) : > 1. The DBMS first parses the SQL statement. It breaks the statement up > into individual words, called tokens, makes sure that the statement > has a valid verb and valid clauses, and so on. Syntax errors and > misspellings can be detected in this step. > 2. The DBMS validates the statement. It checks the statement against > the system catalog. Do all the tables named in the statement exist > in the database? Do all of the columns exist and are the column > names unambiguous? Does the user have the required privileges to > execute the statement? Certain semantic errors can be detected in > this step. The doc also says that **Parsing a SQL statement does not require access to the database and can be done very quickly**, but the amount of requests being fired at the server made me think I should verify. I’d like to measure the resource consumption impact caused by those wrong requests being rejected on those steps. Is there a way to do so?
Asked by Ronaldo (6017 rep)
Feb 22, 2021, 10:04 AM
Last activity: Feb 22, 2021, 01:29 PM