sp_syscollector_enable_collector (Transact-SQL)sp_syscollector_enable_collector (Transact-SQL)

适用于:Applies to: 是SQL ServerSQL Server(所有支持的版本)yesSQL ServerSQL Server (all supported versions) 适用于:Applies to: 是SQL ServerSQL Server(所有支持的版本)yesSQL ServerSQL Server (all supported versions)

启用数据收集器。Enables the data collector. 由于每个服务器只有一个数据收集器,因此不需要任何参数。Because there is only one data collector per server, no parameters are required.

主题链接图标 Transact-SQL 语法约定Topic link icon Transact-SQL Syntax Conventions

语法Syntax

  
dbo.sp_syscollector_enable_collector   

参数Arguments

None

返回代码值Return Code Values

0 (成功) 或 1 (失败) 0 (success) or 1 (failure)

备注Remarks

默认值为服务器上的数据收集器。Defaults to the data collector on the server.

权限Permissions

必须具有 dc_admindc_operator (拥有 EXECUTE 权限)固定数据库角色的成员身份才能执行此过程。Requires membership in the dc_admin or dc_operator (with EXECUTE permission) fixed database role to execute this procedure.

示例Examples

以下示例启用数据收集器。The following example enables the data collector.

USE msdb;  
GO  
EXEC dbo.sp_syscollector_enable_collector;  

另请参阅See Also

系统存储过程 (Transact-SQL) System Stored Procedures (Transact-SQL)
“数据收集”Data Collection