共用方式為


srv_got_attention (Extended Stored Procedure API)

ms164635.note(zh-tw,SQL.90).gif重要事項:
未來的 Microsoft SQL Server 發行版本將不再提供此功能。請勿在新的開發工作中使用此功能,並且儘速修改使用此功能的應用程式。 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 * 
srvproc
);

參數

  • srvproc
    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.

ms164635.security(zh-tw,SQL.90).gif安全性注意事項:
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.