Categories: SQL Server

SQL Server Error: 1326 Logon failure: unknown user name or bad password.

Problem Description:

Microsoft SQL database: [][State =01000][Error=1326][Microsoft][ODBC SQL Server Driver] [SQL Server]”Logon failure: unknown user name or bad password.

sql server error 1326 windows 10
sql server error 17
named pipes provider: could not open a connection to sql server (53)

Cause of the issue

Error 1326 means “Logon failure: unknown user name or bad password.” This error is raised because the IIS Service does not have any rights to use the named pipe.

Or It’s possible, even likely, that SQL Express is not listening on port 1433. By default, we use dynamic TCP ports, which is why you need SQL Browser to be running in the first place. Check out http://support.microsoft.com/kb/914277 which it a different take on enabling remote connections through the firewall.

Explanation:

A client must be validated by the Windows NT server before being granted access to a Windows NT named pipe. This is usually performed through a

1.Workgroups-style validation in which the client and server produce identical identities and passwords

2. the domain method in which both the client and server are domain members.

IIS produces a Windows NT ID named IUSR machine-name (where machine name is the name of the Windows NT server) and adds that user to the Guest local group during the setup process. This Windows NT account is used to execute the IIS service.

IIS employs the Windows NT account IUSR machine-name if the connection to IIS is anonymous, and any network activity performed by IIS is done under this account ID.

Named pipes connections work and validation is successful if the SQL server and IIS are on the same server.
If SQL is installed on a different server than IIS, the IUSR machine name account must be confirmed on the Windows NT server where SQL is installed.

Solution for Resolving The Problem

This account must be verified by the server hosting Microsoft SQL Server in order for the connection to occur properly. If this account is not verified, then the connection fails and provides only the line number in the script file of the attempted connection opening.

To resolve this problem, you can use one of the following options:

  1. Enable the Windows NT ID Guest.
  2. Make the Windows NT user, IUSR_Machine-Name, a member of the domain where SQL server resides.
  3. Use the account information from Internet Service Manager to set up a local user account on the Windows NT Server that hosts SQL Server.
  4. Make sure named pipes provider is enabled for error relating to “named pipes provider: could not open a connection to sql server”
  5. Make sure firewall exceptions are added for sql server for remote access if ” a network-related or instance-specific error in sql server 2014 error 26 ” or ” microsoft sql server error 53 “

 

Try below if above does not resolve if 2005 version

  1. Using the SQL Server 2005 Surface Area Configuration tool, enable remote connections to accept both local and remote connections.
  2. Using SQL Server Configuration Manager, configure the same TCP for both SQLSERVER(EXPRESS) and SQL Native Client port protocols. Use the default port (1433) if possible, but it must be the same for both the Server and Client components. Remember to re-initialize both the SQL Server and SQL Browser services.
  3. Add sqlservr.exe and sqlbrowser.exe as exceptions to your firewall (which was the source of the problem). In SQL Server 2005, you don’t need to use the netsh command.

Before installing the SQL Native Client, I was able to login remotely using the SQL Compact Edition that came with the LAP. The only thing I didn’t like about it was that I couldn’t utilize a Trusted Connection and had to rely on the SQL sa user and password instead.

VRB

Recent Posts

sql server detected logical consistency based error

Learn about SQL Server detecting logical consistency based issues and how to resolve them.

5 months ago

sql server error 1222

Learn about SQL Server error 1222 and how to resolve the lock request time out…

5 months ago

Microsoft SQL Server 2022 New Features

Discover the new features of Microsoft SQL Server 2022 and how they compare to previous…

5 months ago

SQL Server Error 1222 lock request time out period exceeded

SQL Server Error 1222 lock request time out period exceeded   Lock request time out…

6 months ago

SQL Server Error : 427, Severity: 20. Could not load the definition for constr

SQL Server Error : 427, Severity: 20. Could not load the definition for constraint ID…

11 months ago

SQL Server Error : 204, Severity: 20. Normalization error in node %ls.

SQL Server Error : 204, Severity: 20. Normalization error in node %ls.

11 months ago

This website uses cookies.