MSQL_XP

(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 exactly as described by the Books Online entry (although the second sentence should say ‘SQL Server *also* uses this wait state…). Note that this is a preemptive wait, so the thread will continue executing on the processor until the XP completes.

(Books Online description: “Occurs when a task is waiting for an extended stored procedure to end. SQL Server uses this wait state to detect potential MARS application deadlocks. The wait stops when the extended stored procedure call ends.”)

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:

Pre-2005/2005

Removed in SQL Server version:

N/A

Extended Events wait_type value:

The map_key value in sys.dm_xe_map_values is 200 in 2008 and 2008 R2, 207 in 2012, and 214 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:

If this wait type becomes prevalent on your server, identify which of your extended stored procedures are being executed (using my script) and then troubleshoot the XP code.

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

  1. Waiting for an XP call to complete

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

  1. SOS_Task::PopWait+b1
    SOS_ExternalAutoWait::~SOS_ExternalAutoWait+7c
    FCallRpcDLL+1d3
    CXProc::Execute+51f
    CSQLSource::Execute+9ae
    CStmtExecProc::XretLocalExec+25a
    CStmtExecProc::XretExecExecute+4e8
    CXStmtExecProc::XretExecute+38
    CMsqlExecContext::ExecuteStmts<1,1>+427
    CMsqlExecContext::FExecute+a43
    CSQLSource::Execute+86c
    process_request+a57
    process_commands+4a3
    SOS_Task::Param::Execute+21e
    SOS_Scheduler::RunTask+ab