PREEMPTIVE_OS_AUTHZINITIALIZECONTEXTFROMSID

(Republishing, or using this info in a commercial product/website, is prohibited without permission. All other uses are permitted. If in doubt, please ask.)

(Back to main page…)

Description:

This wait type is when a thread is calling the Windows AuthzInitializeContextFromSid function.

(Books Online description: N/A)

Questions/comments on this wait type? Click here to send Paul an email, especially if you have any information to add to this topic.

Added in SQL Server version:

2008

Removed in SQL Server version:

N/A

Extended Events wait_type value:

The map_key value in sys.dm_xe_map_values is 379 in 2008 and 2008 R2, 427 in 2012, and 443 in 2014 RTM. After 2014 RTM, you must check the DMV to get the latest value as some map_key values have changed in later builds.

Other information:

I have not seen this wait type be a noticeable contention point.

Note that when a thread calls out to Windows, the thread changes from non-preemptive (SQL Server controls the thread) to preemptive (Windows controls the thread) mode. The thread’s state will be listed as RUNNING, as SQL Server doesn’t know what Windows is doing with the thread.

Known occurrences in SQL Server (list number matches call stack list):

  1. Initializing a security context (in this case, while pulling data from a linked server)
  2. Initializing a security context (in this case, while sending a Service Broker message)
  3. Initializing a security context (in this case, while creating an In-memory OLTP stored procedure)

And other similar call stacks.

Abbreviated call stacks (list number matches known occurrences list):

  1. SOS_Task::PopWait+ba
    AutoSwitchPreemptive::~AutoSwitchPreemptive+6e
    CWindowsSecurityPrimaryInfo::GetNtGroupsViaAuthZ+282
    CWindowsSecurityPrimaryInfo::Init+1f8
    GetWindowsSecurityPrimaryInfo+e3
    CRowsetNtUserOrGroupInstantiate::GetIUtRowsetInstance+134
    CUtRowset::Init+36
    CreateIRowset+69
    COledbRangeUtRowset::GetRowset+250
    CQScanRmtScanNew::OpenConnection+24d
    CQScanRmtBaseNew::OpenHelper+4a
    CQScanHash::ConsumeBuild+e2
    CQScanHash::Iterate+5f
    CQScanHash::Open+79
  2. SOS_Task::PopWait+bc
    SOS_Task::AutoSwitchPreemptive::~AutoSwitchPreemptive+72
    CWindowsSecurityPrimaryInfo::GetNtGroupsViaAuthZ+221
    CWindowsSecurityPrimaryInfo::Init+186
    GetWindowsSecurityPrimaryInfo+8e
    CreateLoginToken+2c5
    CreateLoginTokenForImpersonation+60d
    CAutoExecuteAsContext::Set+c5
    CSbSecurityMgr::AccessCheckExecuteAs+1dd
    CSbSecurityMgr::AccessCheckServiceSEND+30
    CDialogEndpoint::FCreateTarget+212
    CDialogEndpoint::ReceiveMessageInternal+5e
    CDialogEndpoint::ReceiveMessageList+7d4
    CSsbClassifier::SendMessage+6c3
    CDialogEndpoint::SendMessage+951
    CDialogEndpoint::SendSequencedMsg+34d
    CStmtSendMsg::XretSvcBrokerExecute+4d1
    CXStmtBrokerDDL::XretExecute+137
    CMsqlExecContext::ExecuteStmts<1,1>+352
    CMsqlExecContext::FExecute+878
    CSQLSource::Execute+7d3
  3. SOS_Task::PopWait+b1
    SOS_ExternalAutoWait::~SOS_ExternalAutoWait+7c
    CWindowsSecurityPrimaryInfo::GetNtGroupsViaAuthZ+392
    CWindowsSecurityPrimaryInfo::Init+2f5
    GetWindowsSecurityPrimaryInfo+be
    CreateLoginToken+263
    CreateLoginTokenForImpersonation+a7a
    CAutoExecuteAsContext::Set+df7
    CSECExecAsRuntimeServices::_Set+47f
    FHasPerms+4d
    CreateHkProcedure+3f8
    CStmtCreateSqlProc::UpdateObject+318
    CStmtCreateSqlProc::XretDoExecute+369
    CStmtCreateSql::XretExecute+5e
    CMsqlExecContext::ExecuteStmts<1,1>+427
    CMsqlExecContext::FExecute+a43
    CSQLSource::Execute+86c