SQL Server Errors

The last statement included within a function must be a return statement.

Error Message: Msg 455, Level 16, State 2, Procedure, Line 6 The last statement included within a function must be a return statement. Severity level: 16. Description: This error message appears when you try to call a function whose last statement is not a return statement. Consequences: The T-SQL statement can be parsed, but causes […]

Vardecimal storage format cannot be enabled on table ‘%.*ls’ because database ‘%.*ls’ is a system database. Vardecimal storage format is not available in system databases.

Error Message: Msg 4995, Level 16, State 10, Procedure sp_tableoption, Line 129 Vardecimal storage format cannot be enabled on table ‘%.*ls’ because database ‘%.*ls’ is a system database. Vardecimal storage format is not available in system databases. Severity level: 16. Description: This error message appears when you try to enable the vardecimal storage format on […]

A trigger returned a resultset and the server option ‘disallow results from triggers’ is true.

Error Message: Msg 524, Level 16, State 1, Procedure, Line 5 A trigger returned a resultset and the server option ‘disallow results from triggers’ is true. Severity level: 16. Description: This error message appears when you try to return a resultset from a trigger while the server option ‘disallow results from triggers’ is set to […]

Index ‘%.*ls’ could not be created or rebuilt. The key length for this index (%d bytes) exceeds the maximum allowed length of ‘%d’ bytes when using the vardecimal storage format.

Error Message: Msg 10617, Level 16, State 1, Line 2 Index ‘%.*ls’ could not be created or rebuilt. The key length for this index (%d bytes) exceeds the maximum allowed length of ‘%d’ bytes when using the vardecimal storage format. Severity level: 16. Description: This error message appears when you try to create an index […]

Cannot set NOCOUNT to OFF inside the trigger execution because the server option “disallow_results_from_triggers” is true or we are inside LOGON trigger execution.

Error Message: Cannot set NOCOUNT to OFF inside the trigger execution because the server option “disallow_results_from_triggers” is true or we are inside LOGON trigger execution. Cannot set NOCOUNT to OFF inside the trigger execution because the server option “disallow_results_from_triggers” is true or we are inside LOGON trigger execution. Severity level: 10. Description: This informational error […]

ALTER TABLE SWITCH statement failed. Target table ‘%.*ls’ and source table ‘%.*ls’ have different vardecimal storage format values.

Error Message: Msg 4984, Level 16, State 1, Line 2 ALTER TABLE SWITCH statement failed. Target table ‘%.*ls’ and source table ‘%.*ls’ have different vardecimal storage format values. Use stored procedure sp_tableoption to alter the ‘vardecimal storage format’ option for the tables to make sure that the values are the same. Severity level: 16. Description: […]

Cannot create plan guide ‘%.*ls’ because the module ‘%.*ls’ does not exist or you do not have needed permission.

Error Message: Msg 10515, Level 16, State 1, Procedure sp_create_plan_guide, Line 15 Cannot create plan guide ‘%.*ls’ because the module ‘%.*ls’ does not exist or you do not have needed permission. Severity level: 16. Description: This error message appears when you try to create a planguide, but the object specified in the @module_or_batch parameter does […]

ALTER TABLE SWITCH statement failed because column ‘%.*ls’ does not have the same collation in tables ‘%.*ls’ and ‘%.*ls’.

Error Message: Msg 4945, Level 16, State 1, Line 2 ALTER TABLE SWITCH statement failed because column ‘%.*ls’ does not have the same collation in tables ‘%.*ls’ and ‘%.*ls’. Severity level: 16. Description: This error message appears when you try to run an ALTER TABLE SWITCH statement for which columns in the base tables do […]

Cannot create plan guide ‘%.*ls’ because @module_or_batch can not be compiled.

Error Message: Msg 10516, Level 16, State 1, Procedure sp_create_plan_guide, Line 20 Cannot create plan guide ‘%.*ls’ because @module_or_batch can not be compiled. Severity level: 16. Description: This error message appears when you try to create a planguide, but the @module_or_batch parameter cannot be compiled. Consequences: The T-SQL statement can be parsed, but causes the […]

Cannot create plan guide ‘%.*ls’ because value ‘%.*ls’ provided for @module_or_batch is not legal two-part name. Use ‘schema_name.object_name’.

Error Message: Msg 10505, Level 16, State 1, Procedure sp_create_plan_guide, Line 15 Cannot create plan guide ‘%.*ls’ because value ‘%.*ls’ provided for @module_or_batch is not legal two-part name. Use ‘schema_name.object_name’. Severity level: 16. Description: This error message appears when you try to create a planguide, but the value provided for the @module_or_batch parameter is not […]

Software Reviews | Book Reviews | FAQs | Tips | Articles | Performance Tuning | Audit | BI | Clustering | Developer | Reporting | DBA | ASP.NET Ado | Views tips | | Developer FAQs | Replication Tips | OS Tips | Misc Tips | Index Tuning Tips | Hints Tips | High Availability Tips | Hardware Tips | ETL Tips | Components Tips | Configuration Tips | App Dev Tips | OLAP Tips | Admin Tips | Software Reviews | Error | Clustering FAQs | Performance Tuning FAQs | DBA FAQs |