sys.sp_xtp_control_proc_exec_stats (Transact-SQL)

Van toepassing op:SQL Server

Maakt het mogelijk om statistieken te verzamelen voor native gecompileerde opgeslagen procedures voor de instantie.

Om statistiekverzameling op queryniveau mogelijk te maken voor native gecompileerde opgeslagen procedures, zie sys.sp_xtp_control_query_exec_stats.

Syntax

sys.sp_xtp_control_proc_exec_stats
    [ [ @new_collection_value = ] new_collection_value ]
    [ , [ @old_collection_value = ] old_collection_value OUTPUT ]
[ ; ]

Arguments

[ @new_collection_value = ] new_collection_value

Bepaalt of het verzamelen van statistieken op procedureniveau aan (1) of uit (0) is. @new_collection_value is gebeten.

@new_collection_valuewordt op nul gezet wanneer SQL Server of de database start.

[ @old_collection_value = ] old_collection_value OUTPUT

Geeft de huidige status terug. @old_collection_value is gebeten.

Codewaarden retourneren

0 voor succes. Niet-nul voor falen.

Permissions

Vereist lidmaatschap van de vaste sysadmin-rol .

Examples

Om @new_collection_value in te stellen en te zoeken naar de waarde van @new_collection_value:

EXECUTE sys.sp_xtp_control_proc_exec_stats @new_collection_value = 1;

DECLARE @c AS BIT;

EXECUTE sys.sp_xtp_control_proc_exec_stats
    @old_collection_value = @c OUTPUT;

SELECT @c AS 'collection status';