Skip to content

Latest commit

 

History

History
48 lines (37 loc) · 1.76 KB

srv-got-attention-extended-stored-procedure-api.md

File metadata and controls

48 lines (37 loc) · 1.76 KB
title description author ms.author ms.date ms.service ms.subservice ms.topic helpviewer_keywords dev_langs apilocation apiname apitype
srv_got_attention (Extended Stored Procedure API)
Learn how srv_got_attention checks if the current connection or task needs to be aborted and returns TRUE if the connection is killed or the batch is aborted.
VanMSFT
vanto
03/03/2017
sql
stored-procedures
reference
srv_got_attention
C++
opends60.dll
srv_got_attention
DLLExport

srv_got_attention (Extended Stored Procedure API)

[!INCLUDE SQL Server]

Important

[!INCLUDEssNoteDepFutureAvoid] Use CLR integration instead.

Checks whether the current connection or task needs to be aborted and returns TRUE if the connection is killed or the batch is aborted

Syntax

  
BOOL srv_got_attention (SRV_PROC *   
srvproc  
);  

Parameters

srvproc
Pointer identifying a database connection.

Return Value

TRUE if the connection is killed or the batch is aborted. FALSE if the connection or batch is active.

Remarks

A long-running extended stored procedure should check the server attention by calling srv_got_attention periodically so that the procedure may terminate itself when the connection is killed or the batch is aborted.

Important

You should thoroughly review the source code of extended stored procedures, and you should test the compiled DLLs before you install them on a production server. For information about security review and testing, see this Microsoft Web site.