Software⏱️ 3 min read📅 2026-06-11

How to Fix error 18456 Error – Cannot connect with Sql Server Studio: error 18456, state 8 -- but password is correct

Error 18456 occurs when connecting to SQL Server 2005 using SQL Studio Express on Windows 7-64, despite correct password. Possible causes include different MDAC versions on machines.

Quick Answer: Check for differences in MDAC versions and consider reverting Windows 7 back to an older version of MDAC.

Error 18456, State 8 occurs when attempting to connect to SQL Server using SQL Server Studio on a Windows 7-64 machine. This error is specific to users who have correctly entered their usernames and passwords but are still encountering issues with connection. The issue affects individuals who use SQL Server Express, and it's frustrating because the problem persists even after verifying that the password is correct.

This error can be particularly vexing due to its specificity – it points towards a password mismatch when, in fact, the correct credentials have been provided. Despite this, the error persists across different machines and clients, including SQLCMD and JDBC-based clients like Squirrel.

⚠️ Common Causes

  • The primary reason for Error 18456, State 8 is related to differences in MDAC (Microsoft Data Access Components) versions on the client machine. Since SQL Server Express relies heavily on MDAC for its functionality, even minor version discrepancies can cause issues with connection attempts.
  • Another potential root cause could be the presence of additional security features or settings on the client machine that interfere with the connection attempt. However, this is less likely given that the issue persists across different machines and clients.

🚀 How to Resolve This Issue

Updating MDAC to a compatible version

  1. Step 1: Download and install the latest version of MDAC from Microsoft's official website.
  2. Step 2: After installation, ensure that the MDAC version is set to its default settings. This may involve checking the 'Compatibility' or 'Version' settings in the Control Panel or Windows Settings.
  3. Step 3: Restart SQL Server Studio after updating MDAC to ensure the changes take effect.

Reverting Windows 7 to an older version of MDAC

  1. Step 1: Use the built-in 'System File Checker' tool (sfc /scannow) to scan for and repair corrupted system files, including those related to MDAC.
  2. Step 2: Manually download and install a compatible version of MDAC from Microsoft's official website. Be cautious when downloading updates to ensure you're installing a version that is compatible with your SQL Server Express installation.

✨ Wrapping Up

To resolve the Error 18456, State 8 issue in SQL Server Studio on Windows 7-64, it is recommended to update MDAC to its latest version. This should ensure compatibility and resolve issues related to password mismatches. If updating MDAC proves unsuccessful, reverting Windows 7 to an older version of MDAC may be a viable alternative solution.

Did this fix your problem?

If not, try searching for specific error codes.

🔍 Search Error Database

❓ Frequently Asked Questions