SQL error codes that are preceded by a negative sign, that indicates that the execution of the SQL statement was not successful.
Few examples of SQL Error codes (list) are as follows:
- -007 – this contains illegal character
- -010 – the beginning string is not terminated
- -011 – comment is not closed
- -029 – into clause is required
- -078 – parameter name must be specified
- -079 – qualifier for object name was specified as qualifier 1 but qualifier 2 is needed
- -084 – SQL statement is unacceptable
Sql error 18456
If the server prevents a successful login, the following error message will be displayed in the login process.
Msg 18456, Level 14, State 1, Server <server name>, Line 1
Login failed for user ‘user name’
This message is non descriptive for the prevention of disclosure of information to unauthorized clients. Particularly we have to mention the ‘State’ which will be ‘1’ irrespective of the actual problem. For the identification of failure, the admin have to look into the error log where an entry will be found. Below is an example of an entry:
2006-02-21 00:04:00:36 Logon Error: 18456, Severity: 14, State: 8
2006-02-21 00:04:00:36 Logon Login failed for user ‘user name’
[Client: IP address]
The key here is the ‘state’ which should lead us to the root of the problem. Below is the list of some error states and their root causes:
2 – This indicates invalid user id
5 – It also indicates invalid user id
6 – It indicates the attempt to use a Windows login name with SQL authentication
7 – Login disabled and password mismatch
8 – Password mismatch
9 – Invalid password
Sql server error 18456
This means that our request for a connection was received successfully by the server name specified but it is not able to grant us the access and it throws the 18456 error.
This happens due to following problems:
Invalid user Id – the server is not able to find the specified user id on the server list we are trying to get. The main reason is that the particular user id hasn’t been granted an access to the server.
Invalid password – wrong password on it might be just a typo. Same username can have different passwords on different servers.
Sql error 1064
This error occurs mainly due to the fact that Mysql version mismatch. This happens because different versions have different reserved words which will cause the error if it is used in previous version.
The most useful solution for this is:
- If we are using phpMyadmin, we have to select the “compatibility mode” & have to select the target db version from the drop down box.
- If we are using MySql administrator, while going for backing up, we have to choose “compatibility mode” in advanced tab while restoring through mysql administrator we have to click “auto-detect file character set” and if the backup was not made by using mySql administrator the default file character set used by mysql administrator is utf8.
Sql error 26
We get this error message when the connection to a SQL server is failed and we don’t know how to solve this problem. This particular error message gives very specific information and also the solution is very simple.
Steps to resolve the issue:
- Ensure your server name is proper
- Ensure the instance name is proper
- Make sure that is such an instance with the other machine
- Ensure the server machine can be pinged
- Ensure SQL Browser is present on the server.
If we are done with the above steps, we will not see this particular error message anymore:
Sql server error 53
This server error message is a number and letter format of the error code. This error code can be used by merchants to diagnose the error. Sometimes the error message includes an extra factor in SQL server error 53 formats. Additional code is the location where the directions are filled at the time of error code.
The main cause of this error is due to the corruption of Microsoft windows system file corruption.
Corrupt system entries causes severe damage to PC. Any unfinished installation, a partial file deletion, bad deletion of software or components can cause corrupt system entries. It can also be triggered if the PC has a virus. A corrupted system file causes missing data and archives essential for the best functioning of the particular application.
This error can be solved by the following ways:
- Switch on your system and then we have to login as the administrator.
- We have to click the Get started button then select All Programs, Accessories, Tools, and after that select System Restore.
- Then from the new window, click “Restore my personal computer to an earlier date” then we have to click next.
- We have to select the latest system restore date from the “click a restore point” listing, and then again we have to click on Next.
- We have to click next in the confirmation screen.
- We have to restart the computer system when the restoration is completed.
Sql error 10061
Surface area connection by default doesn’t allow remote connection. We had to allow remote connection to get rid of this problem.
We have to click on Start ->All Programs->SQL server 2005->Configuration Tool->SQL Server Surface Area Configuration. We have to select surface area configuration for services and connection. Then we have to select the sql server component for which remote connection should be allowed.
Configuring remote connection
We have to select remote connection and then we will be able to see the settings. If we want to allow remote connections then we have to select Local and Remote Connections and then using both TCP/IP and Named Pipes and then we have to apply the changes. We then just have to restart the sql server service.
I hope the above description of the error codes will be useful in tackling the problems in real time and solving them with ease.
This article was last updated on May 31st, 2012 in Help