sys.sp_xtp_control_proc_exec_stats (Transact-SQL)
Aktiviert die Statistiksammlung für systemintern kompilierte gespeicherte Prozeduren für die Instanz.
Informationen zum Aktivieren der Statistiksammlung auf der Abfragenebene für systemintern kompilierte gespeicherte Prozeduren finden Sie unter sys.sp_xtp_control_query_exec_stats (Transact-SQL).
Gilt für: SQL Server (SQL Server 2014 bis aktuelle Version). |
Syntax
sp_xtp_control_proc_exec_stats [ [ @new_collection_value = ] collection_value ], [ @old_collection_value]
Argumente
@new\_collection\_value = value
Bestimmt, ob die Statistiksammlung auf Prozedurebene aktiviert (1) oder deaktiviert (0) ist.@new\_collection\_value ist auf 0 festgelegt, wenn SQL Server oder die Datenbank gestartet wird.
@old\_collection\_value = value
Gibt den aktuellen Status zurück.
Rückgabecode
0 für Erfolg. Ungleich 0 für Fehler.
Berechtigungen
Erfordert die Mitgliedschaft in der festen sysadmin-Rolle.
Codebeispiele
So legen Sie @new\_collection\_value fest und fragen den Wert von @new\_collection\_value ab:
exec [sys].[sp_xtp_control_proc_exec_stats] @new_collection_value = 1
declare @c bit
exec sp_xtp_control_proc_exec_stats @old_collection_value=@c output
select @c as 'collection status'
Siehe auch
Verweis
Gespeicherte Systemprozeduren (Transact-SQL)