SQL Server Errors

The text, ntext, and image data types cannot be compared or sorted, except when using IS NULL or LIKE operator.

Error Message:Msg 306, Level 16, State 2, Line 2The text, ntext, and image data types cannot be compared or sorted, except when using IS NULL or LIKE operator. Severity level:16. Description:This error message appears when you try to group by a column of the data type TEXT, NTEXT, or IMAGE. Consequences:The T-SQL statement can be […]

An INSERT statement cannot contain a SELECT statement that assigns values to a variable.

Error Message:Msg 199, Level 15, State 1, Line 0An INSERT statement cannot contain a SELECT statement that assigns values to a variable. Severity level:15. Description:This error message appears when you try to use an INSERT statement that contains a SELECT statement, in which values are assigned to a variable. Consequences:The SQL statement cannot be parsed […]

Index ID %d on table ‘%.*ls’ (specified in the FROM clause) does not exist.

Error Message:Msg 307, Level 16, State 1, Line 1Index ID %d on table ‘%.*ls’ (specified in the FROM clause) does not exist. Severity level:16. Description:This error message appears when you try to specify an index that does not exist in an index hint. Consequences:The T-SQL statement can be parsed, but causes the error at runtime. […]

Operand type clash: %ls is incompatible with %ls

Error Message:Msg 206, Level 16, State 2, Line 1Operand type clash: %ls is incompatible with %ls Severity level:16. Description:This error message appears when you try to use two incompatible operands in an operator. Consequences:The T-SQL statement can be parsed, but causes the error at runtime. Resolution:Error of the Severity level 16 are generated by the […]

The data types %s and %s are incompatible in the %s operator.

Error Message:Msg 402, Level 16, State 1, Line 3The data types %s and %s are incompatible in the %s operator. Severity level:16. Description:This error message appears when you try to use an operator with incompatible values of incompatible data types for this operator. Consequences:The T-SQL statement can be parsed, but causes the error at runtime. […]

An error has occurred while establishing a connection to the server. When connecting to SQL Server 2005, this failure may be caused by the fact that under the default settings SQL Server does not allow remote connections.

There are several reasons for this error. 1. Enable Remote Connection If you are using SQL Server 2005 Express or SQL Server Developer editions, you have to enable Remote connections. By default, SQL Server 2005 express, developer and evaluation editions allow local client connections only.             You must enable remote connections for each instance of […]

The MSSQLSERVER service on Local Computer started and then stopped. Some services stop automatically if they have no work to do, for example, the Performance Logs and Alerts service

SQL Server agent does not start when the OS starts. When I try to start MSSQLSERVER in Services manually (even though it’s set for Automatic) I get “The MSSQLSERVER service on Local Computer started and then stopped.  Some services stop automatically if they have no work to do, for example, the Performance Logs and Alerts […]

The label ‘%.*ls’ has already been declared. Label names must be unique within a query batch or stored procedure.

Error Message:Msg 132, Level 15, State 1, Line 11The label ‘%.*ls’ has already been declared. Label names must be unique within a query batch or stored procedure. Severity level:15. Description:This error message appears when you try to specify a label more than once. Consequences:The SQL statement cannot be parsed and further execution is stopped. Resolution:Error […]

Cannot specify a log file in a CREATE DATABASE statement without also specifying at least one data file.

Error Message:Msg 188, Level 15, State 1, Line 2Cannot specify a log file in a CREATE DATABASE statement without also specifying at least one data file. Severity level:15. Description:This error message appears when you try to specify a log file in a CREATE DATABASE statement, without specifying at least one data file. Consequences:The SQL statement […]

A GOTO statement references the label ‘%.*ls’ but the label has not been declared.

Error Message:Msg 133, Level 15, State 1, Line 10A GOTO statement references the label ‘%.*ls’ but the label has not been declared. Severity level:15. Description:This error message appears when you try to reference a label which has not been declared yet Consequences:The SQL statement cannot be parsed and further execution is stopped. Resolution:Error of the […]
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 |