SQL Server Errors or Failures Error 21, Error 101 to Error 120
Below are some of the errors raised by SQL Server
Error: 21, Severity: 20,
Warning: Fatal error occurred at DATE TIME. Note the error and time, and contact your system administrator.
– This error is accompanied along with other errors like Error 823 or Error 824 reporting critical problems with the SQL Server database files related to possible corruption. You need to look into the accompanied error message to troubleshoot the issue.
Error: 101, Severity: 15,
Query not allowed in Waitfor.
Error: 102, Severity: 15, State: 1,Msg 102, Level 15, State 1, Line 3
Incorrect syntax near ‘%.*ls’.
– This above error occurs if there is any syntax error with the query being executed. Another error would follow with this error with more details to point on what and where the syntax error could be. It is sometimes very difficult to find the syntax error as it could be very small issue like single quote is typed as ` instead of ‘. There could be various other syntax errors causing this error.
Error: 103, Severity: 15,
The %S_MSG that starts with ‘%.*ls’ is too long. Maximum length is %d.
Error: 104, Severity: 15,
ORDER BY items must appear in the select list if the statement contains a UNION, INTERSECT or EXCEPT operator.
Error: 105, Severity: 15, State: 1Msg 105, Level 15, State 1, Line 4
Unclosed quotation mark after the character string ‘%.*ls’.
– This above error can occur, if you used a single quote only once, and SQL Server is expecting another single quote to close the statement inside the single quotes. Example: You want to put the filename in a single quote like ‘FileName but missed to put the second single quote, then this error is returned. So, verify and add the missing single quotes where required.
– The error can also occur if the single quote ‘ was expected to be used, but a different charecter like ` was used. This can generally happen when you copy the code from MSWord to SSMS or when you copy code from a website and paste it in SSMS. So, carefully observe and retype the single quotes where ever used in the query.
Error: 106, Severity: 16,
Too many table names in the query. The maximum allowable is %d.
Error: 107, Severity: 15,
The column prefix ‘%.*ls’ does not match with a table name or alias name used in the query.
Error: 108, Severity: 15,
The ORDER BY position number %ld is out of range of the number of items in the select list.
Error: 109, Severity: 15,
There are more columns in the INSERT statement than values specified in the VALUES clause. The number of values in the VALUES clause must match the number of columns specified in the INSERT statement.
Error: 110, Severity: 15,
There are fewer columns in the INSERT statement than values specified in the VALUES clause. The number of values in the VALUES clause must match the number of columns specified in the INSERT statement.
Error: 111, Severity: 15,
‘%ls’ must be the first statement in a query batch.
Error: 112, Severity: 15,
Variables are not allowed in the %ls statement.
Error: 113, Severity: 15,
Missing end comment mark ‘*/’.
Error: 114, Severity: 15,
Browse mode is invalid for a statement that assigns values to a variable.
Error: 115, Severity: 15,
The FOR UPDATE clause is invalid for statements containing set operators.
Error: 116, Severity: 15,
Only one expression can be specified in the select list when the subquery is not introduced with EXISTS.
Error: 117, Severity: 15,
The %S_MSG name ‘%.*ls’ contains more than the maximum number of prefixes. The maximum is %d.
Error: 119, Severity: 15,
Must pass parameter number %d and subsequent parameters as ‘@name = value’. After the form ‘@name = value’ has been used, all subsequent parameters must be passed in the form ‘@name = value’.
Error: 120, Severity: 15,
The select list for the INSERT statement contains fewer items than the insert list. The number of SELECT values must match the number of INSERT columns.
This is applicable on below versions of SQL Server
SQL Server 2005
SQL Server 2008 R2
SQL Server 2012
SQL Server 2014
Hope this was helpful.
In-Depth Blogs on SQL Server, Information about SQL Server Conferences and Events, SQL Server Frequently asked questions, SQL Server Trainings.