The authentication timeouts and slowness happen for both local SQL logins and Windows authentication using AD. Rebooting "masks" the problem for a while, but after 6-8 hours, we see them again.

The whole time, I see high numbers of PREEMPTIVE_OS_AUTHENTICATIONOPS waits.

It can't be strictly an AD or routing issue because authentication happens instantly during RDP login using a domain account, even after many hours or days of uptime.

telnet to the relevant ports on the DC instantly return success, so the ports are open.

I've gone through everything on this page, to no avail: https://samzsimplesql.wordpress.com/2015/09/01/troubleshooting-connectivity-issues-timeout-error-258-unable-to-complete-login-process-due-to-delay-in-prelogin-response-pre-login-handshake-failed-2/

  • SQL Server: 2008 R2 EE 10.50.6560.0
  • Windows: 2008 Ent
  • AD: 2012 R2

(Yes, I know those are ancient versions, but have no control over that.)

What else can I look at?

EDIT: There are about 1000 connections (it varies throughout the day). "All" (except for the few from me) logins are from the same domain account.

The problem started last Monday.

There are no errors in the SQL Server error log. This is the only (and there were a lot of them!) message in the DB server's event viewer:

The description for Event ID 17052 from source MSSQLSERVER cannot be found. Either the component that raises this event is not installed on your local computer or the installation is corrupted. You can install or repair the component on the local computer.

If the event originated on another computer, the display information had to be saved with the event.

The following information was included with the event:

Severity: 16 Error:258, OS: 258 [Microsoft][SQL Server Native Client 10.0]Shared Memory Provider: Timeout error [258].


1 Answer 1


This wait accumulates while SQL Server is waiting for an Active Directory query to complete. It occurs while listing group members like in in the xp_logininfo stored procedure and the sys.login_token management view. This wait frequently appears along side PREEMPTIVE_OS_LOOKUPACCOUNTSID. If Windows Authentication is being used some values in this wait type are expected. If values are high see the suggested solutions below. Pre-emptive waits are different from regular (emptive) waits as their execution is controlled by an external processes such as the operating system.

  • Reduce the number of Active Directory queries
  • Investigate Windows Event Viewer for any Active Directory messages
  • Fix any Domain Controller performance issues Investigate network performance between the SQL Server and Domain Controller
  • Simplify Active Directory group membership. Avoid excessive nested groups
  • Review site topoly in AD site and services

To narrow down and prove that this issue occurs because of Active directory performance. Login to SQL server using the startup account of SQL Server and execute below query when you notice PREEMPTIVE_OS_AUTHORIZATIONOPS wait type and compare the times printed. It will give you the time it takes for SQL Server to complete the AD calls.

create procedure PREEMPTIVEOSAUTHORIZATIONOPS  with execute as self
set nocount on


print convert(varchar, getdate(), 126)
print convert(varchar, getdate(), 126)


sources: https://sqlserverscribbles.com/2013/09/26/preemptive_os_authorizationops-waits-in-sql-server/

  • 1
    Thanks for the answer. (a) There are no PREEMPTIVE_OS_LOOKUPACCOUNTSID waits, (b) no AD messages in the DB server's Event log, (c) the problem started last Monday. Something changed over that weekend, but no one will fess up to changing anything.
    – RonJohn
    Commented Apr 20, 2022 at 13:13
  • Also, SQL Server runs under a local account. (It used to run under an account in a different domain from the where the server lives, but I changed that to mollify complaints that that is the problem.
    – RonJohn
    Commented Apr 20, 2022 at 13:15

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service and acknowledge you have read our privacy policy.

Not the answer you're looking for? Browse other questions tagged or ask your own question.