Home » SQL Server Errors

SQL Server Errors

SQL Server- Unable to connect to SQL Server Error 26

Error Description:

SQL server error 26- Unable to connect to SQL Express Error: 26-Error Locating Server/Instance Specified

A network-related or instance-specific error occurred while establishing a connection to SQL Server. The server was not found or was not accessible. Verify that the instance name is correct and that SQL Server is configured to allow remote connections. (provider: SQL Network Interfaces, error: 26 – Error Locating Server/Instance Specified) (Microsoft SQL Server, Error: -1)

Error Details: this sql server error 26 error locating server instance message is often encountered when connection to a SQL Server is tried and don’t know where to start to solve the problem.

We get this sql server … Read the rest

SQL Server Error : 162, Severity: 15. Invalid expression in the TOP clause.

SQL Server Error : 162 Details

SQL Server Error: 162 Severity: 15 Event Logged or not: No Description: Invalid expression in the TOP clause. Severity 15 Description: Indicates syntax errors in the Transact-SQL command.

Cause:

Setup the import file to use the current file path and In the control flow diagram there is a step called “import data “

The ssis package creates a temp table named temp, imports the records from the excel workbook worksheet named “Sheet1”. Then queries to match the following “names” with appropriate id’s of table

we can run this import temp data into real table and run again.

Once those id’s have been found/updated then it takes the records from the temp table and copies Read the rest

SQL Server Error : 115, Severity: 15. The FOR UPDATE clause is invalid for sta

SQL Server Error : 115 Details

SQL Server Error: 115 Severity: 15 Event Logged or not: No Description: The FOR UPDATE clause is invalid for statements containing set operators. Severity 15 Description: Indicates syntax errors in the Transact-SQL command.

Reading sql server error log location from SQL Query

Identifying SQL Server Error Log File used by SQL Server Database Engine can be done by reading SQL Server Error Logs. DBA can execute the XP_READERRORLOG extended stored procedure to read the SQL Server Error Log and search for its location used by the instance of SQL Server.

USE master
Go
xp_readerrorlog 0, 1, N'Logging SQL Server messages in file', NULL, NULL, N'asc'
Go

Solution:

Update clause syntax is wrong. please check … Read the rest

SQL Server Error : 114, Severity: 15. Browse mode is invalid for a statement t

SQL Server Error : 114 Details

SQL Server Error: 114 Severity: 15 Event Logged or not: No Description: Browse mode is invalid for a statement that assigns values to a variable. Severity 15 Description: Indicates syntax errors in the Transact-SQL command.

Cause

NetBackup VMware backups using SQL Server application protection fails showing unimplemented sql server error code 114(114)

Credentials used for starting (Log on as) the SQL VSS Writer service on SQL Server are not part of the sysadmin role in SQL Server.

Normally the SYSTEM account is part of Built-in Administrators group on the server but if it is not removed due to security hardening.

Solution

Grant sysadmin permissions to the System account (NT AUTHORITY\SYSTEM) on all SQL Server … Read the rest

SQL Server Error : 113, Severity: 15. Missing end comment mark ‘*/’.

SQL Server Error : 113 Details

SQL Server Error: 113 Severity: 15 Event Logged or not: No Description: Missing end comment mark ‘*/’. Severity 15 Description: Indicates syntax errors in the Transact-SQL command.

Reading sql server error log location from SQL Query

Identifying SQL Server Error Log File used by SQL Server Database Engine can be done by reading SQL Server Error Logs. DBA can execute the XP_READERRORLOG extended stored procedure to read the SQL Server Error Log and search for its location used by the instance of SQL Server.

USE master
Go
xp_readerrorlog 0, 1, N'Logging SQL Server messages in file', NULL, NULL, N'asc'
Go

Solution for Resolving the Error

This error occurs when there is some host settings
Read the rest

SQL Server Error : 165, Severity: 16. Privilege %ls may not be granted or revo

SQL Server Error : 165 Details

SQL Server Error: 165 Severity: 16 Event Logged or not: No Description: Privilege %ls may not be granted or revoked. Severity 16 Description: Indicates general errors that can be corrected by the user.

 

Solution for Resolving the Error

SQL Server [165] ODBC Error: 0, Named Pipes Provider: Could not open a connection to SQL Server [2]. [SQLSTATE 08001]

It normally occurs very frequently like 10-20 times an hour and it to any job failures related to Named pipes. All of other jobs on the same SQL instance might be working.

Make sure named pipes is running and troubleshoot jobs usiing named pipes.

SQL Server Error Code and solution summary

SQL Server Error: 165 … Read the rest

SQL Server Error : 163, Severity: 15. The compute by list does not match the o

SQL Server Error : 163 Details

SQL Server Error: 163 Severity: 15 Event Logged or not: No Description: The compute by list does not match the order by list. Severity 15 Description: Indicates syntax errors in the Transact-SQL command.

Solution:

Make sure compute by list of columns matches the order by list at the bottom.

Indicates syntax errors in the Transact-SQL command.

SQL Server Error Code and solution summary

SQL Server Error: 163 Severity: 15 Event Logged or not: No Description: The compute by list does not match the order by list.… Read the rest

SQL Server Error : 106, Severity: 16. Too many table names in the query. The m

SQL Server Error : 106 Details

SQL Server Error: 106 Severity: 16 Event Logged or not: No Description: Too many table names in the query. The maximum allowable is %d. Severity 16 Description: Indicates general errors that can be corrected by the user.

Reading sql server error log location from SQL Query

Identifying SQL Server Error Log File used by SQL Server Database Engine can be done by reading SQL Server Error Logs. DBA can execute the XP_READERRORLOG extended stored procedure to read the SQL Server Error Log and search for its location used by the instance of SQL Server.

USE master
Go
xp_readerrorlog 0, 1, N'Logging SQL Server messages in file', NULL, NULL, N'asc'
Go

The parameters for XP_READERRRORLOG … Read the rest

SQL Server Error : 164, Severity: 15. Each GROUP BY expression must contain at

SQL Server Error : 164 Details

SQL Server Error: 164 Severity: 15 Event Logged or not: No Description: Each GROUP BY expression must contain at least one column that is not an outer reference. Severity 15 Description: Indicates syntax errors in the Transact-SQL command.

Solution for Resolving the Error

SQL Server does not know positional arguments in group by part of the statement.

So, the column name needs repeatetion in group by part.

The positional syntax is  only permitted for order by like 1,2 etc.

In general it is better to use column names in the order by clause as well to be clear.

Some databases such as Postgres do support positional arguments for group by

SQL Server Error Code

Read the rest

SQL Server Native Client Error 50000: A network error occurred while attempting to read from the file

Error encountered

While installing SQL Server Management Studio on one of the client machines, SQL Server Native Client Error 50000 occurred. This error code was described as “A network error occurred while attempting to read from the file.”

Description of Error

Here, I will describe and explain SQL Server Error 50000 and how to fix it so that SQL Server installation goes smoothly. Before I explain SQL native client error 50000, I’d like to explain what SQL Server native client is. According to MSDN, “SQL Server Native Client” is a term that has been used interchangeably to refer to SQL Server ODBC and OLE DB drivers. SQL Server Native Client is a technology that allows us to access data stored … Read the rest