Was this page helpful?
Your feedback about this content is important. Let us know what you think.
Additional feedback?
1500 characters remaining
srv_got_attention (Extended Stored Procedure API)
Collapse the table of content
Expand the table of content

srv_got_attention (Extended Stored Procedure API)

Important note Important

This feature will be removed in a future version of Microsoft SQL Server. Do not use this feature in new development work, and modify applications that currently use this feature as soon as possible. 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

BOOL srv_got_attention (SRV_PROC *  


Pointer identifying a database connection.

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

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.

Security note Security Note

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.

Community Additions

© 2015 Microsoft