SQL Server Errors

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. […]

The %ls permission was denied on the object ‘%.*ls’, database ‘%.*ls’, schema ‘%.*ls’.

Error Message:Msg 229, Level 14, State 5, Line 1The %ls permission was denied on the object ‘%.*ls’, database ‘%.*ls’, schema ‘%.*ls’. Severity level:14. Description:This error message appears when you try to execute an operation on a database object, but you do not have the appropriate permission to execute this operation. Consequences:The T-SQL statement can be […]

Invalid collation ‘%.*ls’.

Error Message:Msg 448, Level 16, State 3, Line 14Invalid collation ‘%.*ls’. Severity level:16. Description:This error message appears when you try to use an unknown collation in a command. Consequences:The SQL statement cannot be parsed and further execution is stopped. Resolution:Error of the Severity Level 16 are generated by the user and can be fixed by […]

Cannot convert a char value to money. The char value has incorrect syntax.

Error Message:Msg 235, Level 16, State 0, Line 2Cannot convert a char value to money. The char value has incorrect syntax. Severity level:16. Description:This error message appears when you try to convert a non-compatible CHAR value into a value of the type MONEY. Consequences:The SQL statement cannot be parsed and further execution is stopped. Resolution:Error […]

DISTINCT operator is not allowed in the recursive part of a recursive common table expression ‘%.*ls’.

Error Message:Msg 460, Level 16, State 1, Line 1DISTINCT operator is not allowed in the recursive part of a recursive common table expression ‘%.*ls’. Severity level:16. Description:This error message appears when you try to use the DISTINCT operator in the recursive part of a Common Table Expression. Consequences:The T-SQL statement can be parsed, but causes […]

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 […]

Cannot use a BREAK statement outside the scope of a WHILE statement.

Error Message:Msg 135, Level 15, State 1, Line 4Cannot use a BREAK statement outside the scope of a WHILE statement. Severity level:15. Description:This error message appears when you try to use a BREAK statement outside the scope of a WHILE loop. Consequences:The SQL statement cannot be parsed and further execution is stopped. Resolution:Error of the […]

Cannot use a CONTINUE statement outside the scope of a WHILE statement.

Error Message:Msg 136, Level 15, State 1, Line 4Cannot use a CONTINUE statement outside the scope of a WHILE statement. Severity level:15. Description:This error message appears when you try to use a CONTINUE statement outside the scope of a WHILE loop. Consequences:The SQL statement cannot be parsed and further execution is stopped. Resolution:Error of the […]

The size (%d) given to the %S_MSG ‘%.*ls’ exceeds the maximum allowed for any data type (%d).

Error Message:Msg 131, Level 15, State 2, Line 3The size (%d) given to the %S_MSG ‘%.*ls’ exceeds the maximum allowed for any data type (%d). Severity level:15. Description:This error message appears when you try to specify a size for a column that exceeds the maximum allowed size for any data type. Consequences:The SQL statement cannot […]