r/MSAccess • u/First-Feature-3556 • 2h ago
[SHARING HELPFUL TIP] PSA: If your Access application got slower after switching to SQL Server 2025 with SQL Authentication, password hashing might be the culprit.
tl;dr: SQL Server 2025 changes how passwords are hashed, which causes an additional 200ms delay whenever a new connection is established. An SQL Server trace flag can be used to work around this.
This only affects SQL authentication, not Windows authentication.
We recently installed a new test server with SQL Server 2025 and noticed performance issues with our MS Access-based application. Some data-bound forms took a few seconds longer to open, and, most notably, re-attaching linked tables was 4-5x slower than it had been with our SQL Server 2012 dev server.
Additional debugging revealed that opening a new ODBC connection took more than 200ms instead of the ~20ms we expected.
As it turns out, that delay is on purpose: SQL Server 2025 uses a different, more secure hashing algorithm. It's a feature, not a bug. Unfortunately, this caused our application to feel slower - not only when starting, but also when using it.
Obviously, the correct fix would be to ensure that MS Access uses a connection pool instead of re-establishing and re-authenticating so often. In theory, that should work out-of-the-box, since ODBC itself provides a connection pool, but, for whatever reason, it doesn't. And this is what I will look into deeper, as soon as I find some time. (If you already did, feel free to save me some time and share your experiences in the comments.)
In the mean time,
- enabling trace flag 4671 via an SQL Server command line parameter (
-T4671) and then - resetting the password of the affected SQL Server login
can be use to work around this issue.
Note that this will reduce the security of your SQL Server login to that of SQL Server 2022 and older!
To check which hash algorithm is used, you can SELECT * FROM sys.sql_logins. If the password hash starts with 0x02, that SQL Server login uses the the old hash algorithm (fast). If it starts with 0x03, it's the new algorithm (slow).