SQL Server Errors or Failures from Error: 8158 to Error: 8178



Error: 8158, Severity: 15, ‘%.*ls’ has more columns than were specified in the column list.
Error: 8159, Severity: 15, ‘%.*ls’ has fewer columns than were specified in the column list.
Error: 8160, Severity: 15, A GROUPING or GROUPING_ID function can only be specified when there is a GROUP BY clause.
Error: 8161, Severity: 15, Argument %d of the %.*ls function does not match any of the expressions in the GROUP BY clause.
Error: 8162, Severity: 16, The formal parameter “%.*ls” was not declared as an OUTPUT parameter, but the actual parameter passed in requested output.

Error: 8164, Severity: 16, An INSERT EXEC statement cannot be nested.
Error: 8165, Severity: 16, Invalid subcommand value %d. Legal range from %d to %d.
Error: 8166, Severity: 16, Constraint name ‘%.*ls’ not permitted. Constraint names cannot begin with a number sign (#).
Error: 8167, Severity: 16, The type of column “%.*ls” conflicts with the type of other columns specified in the UNPIVOT list.
Error: 8168, Severity: 16, Cannot create, drop, enable, or disable more than one constraint, column, or trigger named ‘%.*ls’ in this context. Duplicate names are not allowed.
Error: 8169, Severity: 16, Conversion failed when converting from a character string to uniqueidentifier.
Error: 8170, Severity: 16, Insufficient result space to convert uniqueidentifier value to char.

Error: 8171, Severity: 16, Hint ‘%ls’ on object ‘%.*ls’ is invalid.
Error: 8172, Severity: 16, The argument %d of the XML data type method “%.*ls” must be a string literal.
Error: 8173, Severity: 15, Incorrect syntax was used to invoke the XML data type method ‘%.*ls’.
Error: 8174, Severity: 16, Schema lock with handle %d not found.
Error: 8175, Severity: 10, Could not find table %.*ls. Will try to resolve this table name later.
Error: 8176, Severity: 16, Resync procedure expects value of key ‘%.*ls’, which was not supplied.
Error: 8177, Severity: 16, Cannot use a column in the %hs clause unless it is contained in either an aggregate function or the GROUP BY clause.
Error: 8178, Severity: 16, The parameterized query ‘%.*ls’ expects the parameter ‘%.*ls’, which was not supplied.

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.

SQLServerF1 Team
In-Depth Blogs on SQL Server, Information about SQL Server Conferences and Events, SQL Server Frequently asked questions, SQL Server Trainings.


Leave a Reply

Your email address will not be published. Required fields are marked *