配置 SQL Server 使用情况和诊断数据收集 (CEIP)Configure usage and diagnostic data collection for SQL Server (CEIP)

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

总结Summary

默认情况下,Microsoft SQL Server 收集有关其客户如何使用应用程序的信息。By default, Microsoft SQL Server collects information about how its customers are using the application. 具体来说,SQL Server 收集有关安装体验、使用情况和性能的信息。Specifically, SQL Server collects information about the installation experience, usage, and performance. 此信息有助于 Microsoft 改进产品以更好地满足客户需求。This information helps Microsoft improve the product to better meet customer needs. 例如,Microsoft 收集有关客户遇到的错误代码类型信息,这样我们就可以修复相关 bug,改进关于如何使用 SQL Server 的文档,并确定是否应将功能添加到产品中以更好地为客户服务。For example, Microsoft collects information about what kinds of error codes customers encounter so that we can fix related bugs, improve our documentation about how to use SQL Server, and determine whether features should be added to the product to better serve customers.

具体而言,Microsoft 不会通过这种机制发送以下任何类型的信息:Specifically, Microsoft does not send any of the following types of information through this mechanism:

  • 用户表中的任何值Any values from inside user tables
  • 任何登录凭据或其他身份验证信息Any logon credentials or other authentication information
  • 个人身份信息 (PII)Personally Identifiable Information (PII)

以下示例场景包括有助于改进产品的功能使用情况信息。The following sample scenario includes feature usage information that helps improve the product.

SQL Server 2017 支持列存储索引,以实现快速分析方案。SQL Server 2017 supports ColumnStore indexes to enable fast analytics scenarios. 列存储索引将新插入数据的传统“B 树”索引结构与面向列的特殊压缩结构相结合,以压缩数据并加快查询执行速度。ColumnStore indexes combine a traditional "B-tree" index structure for newly inserted data with a special column-oriented compressed structure to compress data and speed query execution. 该产品使用探索性方法在后台将数据从 B 树结构迁移到压缩结构,可加快后续获取查询结果的过程。The product contains heuristics to migrate data from the B-tree structure to the compressed structure in the background, thereby speeding up future query results.

如果后台操作未与插入数据的速度保持一致,则查询性能可能比预期要慢。If the background operation does not keep pace with the rate at which data is inserted, query performance may be slower than expected. 为了改进产品,Microsoft 收集有关 SQL Server 与自动数据压缩过程同步情况的信息。To improve the product, Microsoft collects information about how well SQL Server is keeping up with the automatic data compression process. 产品团队使用此信息来微调执行压缩的代码的频率和并行结构。The product team uses this information to fine-tune the frequency and parallelism of the code that performs compression. 此查询偶尔运行以收集此信息,以便我们 (Microsoft) 可以评估数据移动速度。This query is run occasionally to collect this information so that we (Microsoft) can evaluate the data movement rate. 这有助于我们优化产品探索方法。This helps us optimize the product heuristics.

SELECT object_id, type_desc, data_space_id, db_id() AS database_id FROM sys.indexes WITH(nolock) WHERE type = 5 or type = 6 
SELECT cntr_value as merge_policy_evaluation
FROM sys.dm_os_performance_counters WITH(nolock)
WHERE object_name LIKE '%columnstore%' 
AND counter_name ='Total Merge Policy Evaluations' 
AND instance_name = '_Total'

请注意,此过程专注于为客户提供价值的必要机制。Be aware that this process focuses on the necessary mechanisms for delivering value to customers. 产品团队不会查看索引中的数据,也不会将该数据发送给 Microsoft。The product team does not look at the data in the index or send that data to Microsoft. SQL Server 2017 始终收集和发送从安装过程开始的安装体验相关信息,方便我们快速查找并修复客户遇到的任何安装问题。SQL Server 2017 always collects and sends information about the installation experience from the setup process so that we can quickly find and fix any installation problems that the customer is experiencing. 通过以下机制可将 SQL Server 2017 配置为不(基于每个服务器实例)向 Microsoft 发送信息:SQL Server 2017 can be configured not to send information (on a per-server instance basis) to Microsoft through the following mechanisms:

  • 通过使用错误和使用情况报告应用程序By using the Error and Usage Reporting application
  • 通过在服务器上设置注册表子项By setting registry subkeys on the server

对于 Linux 上的 SQL Server,请参阅 Linux 上的 SQL Server 客户反馈For SQL Server on Linux refer to Customer Feedback for SQL Server on Linux

备注

只能在付费版本的 SQL Server 中禁用向 Microsoft 发送信息的功能。You can disable the sending of information to Microsoft only in paid versions of SQL Server.

备注Remarks

  • 不支持删除或禁用 SQL CEIP 服务。Removing or disabling the SQL CEIP service is not supported.
  • 不支持从群集组中删除 SQL CEIP 资源。Removing the SQL CEIP resources from the Cluster Group is not supported.

若要选择退出数据收集,请参阅启用或禁用本地审核To opt out of the data collection, see Turning local audit on or off

错误和使用情况报告应用程序Error and Usage Reporting application

设置完成后,SQL Server 组件和实例的使用情况和诊断数据收集设置可以通过“错误和使用情况报告”应用程序进行更改。After setup, the usage and diagnostic data collection setting for SQL Server components and instances can be changed through the Error and Usage Reporting application. 可将此应用程序作为 SQL Server 安装的一部分。This application is available as part of SQL Server installation. 借助此工具,每个 SQL Server 实例都可以配置自己的使用情况报告设置。This tool lets each SQL Server instance configure its own Usage Reports setting.

备注

错误和使用情况报告应用程序在 SQL Server 的“配置工具”下列出。The Error and Usage Reporting application is listed under the Configuration Tools of SQL Server. 使用此工具,可以 SQL Server 2017 中的相同方式,管理错误报告以及使用情况和诊断数据收集的偏好设置。You can use this tool to manage your preference for Error Reporting and Usage and Diagnostic Data collection in the same manner as in SQL Server 2017. 错误报告独立于使用情况和诊断数据收集,因此可以与使用情况和诊断数据收集分开启用或禁用。Error Reporting is separate from Usage and Diagnostic Data collection, therefore can be turned on or off independently from Usage and Diagnostic Data collection. 错误报告收集发送到 Microsoft 的故障转储,其中可能包含隐私声明中所述的敏感信息。Error Reporting collects crash dumps that are sent to Microsoft and that may contain sensitive information as outlined in the Privacy Statement.

要启动 SQL Server 错误和使用情况报告,请单击或点击“启动”,然后在搜索框中搜索“错误”。To start SQL Server Error and Usage Reporting, click or tap Start, and then search on "Error" in the search box. 将显示 SQL Server 错误和使用情况报告项。The SQL Server Error and Usage Reporting item will be displayed. 启动此工具后,可以管理为相应计算机上安装的实例和组件收集的使用情况和诊断数据以及严重错误。After you start the tool, you can manage usage and diagnostic data as well as serious errors that are collected for instances and components that are installed on that computer.

对于付费版本,选中“使用情况报告”复选框可以管理向 Microsoft 发送使用情况和诊断数据。For paid versions, use the "Usage Reports" check boxes to manage sending usage and diagnostic data to Microsoft.

对于付费或免费版本,请使用“错误报告”复选框来管理向 Microsoft 发送有关严重错误和故障转储反馈的功能。For paid or free versions, use the "Error Reports" check boxes to manage sending feedback on serious errors and crash dumps to Microsoft.

在服务器上设置注册表子项Set registry subkeys on the server

企业客户可以配置组策略设置来选择启用或禁用使用情况和诊断数据收集。Enterprise customers can configure Group Policy settings to opt in or out of usage and diagnostic data collection. 这可通过配置基于注册表的策略完成。This is done by configuring a registry-based policy. 相关注册表子项和设置如下所示:The relevant registry subkey and settings are as follows:

  • 对于 SQL Server 实例功能:For SQL Server instance features:

    子项 = HKEY_LOCAL_MACHINE\Software\Microsoft\Microsoft SQL Server{InstanceID}\CPESubkey = HKEY_LOCAL_MACHINE\Software\Microsoft\Microsoft SQL Server{InstanceID}\CPE

    注册表项名称 = CustomerFeedbackRegEntry name = CustomerFeedback

    注册表项类型 DWORD:0 表示选择退出;1 表示选择加入Entry type DWORD: 0 is opt out; 1 is opt in

    {InstanceID} 是指实例类型和实例,如以下示例所示:{InstanceID} refers to the instance type and instance, as in the following examples:

    • MSSQL14.CANBERRA 是指 SQL Server 2017 数据库引擎,“CANBERRA”指实例名称MSSQL14.CANBERRA for SQL Server 2017 Database engine and Instance name of "CANBERRA"
    • MSAS14.CANBERRA 是指 SQL Server 2017 Analysis Services,“CANBERRA”指实例名称MSAS14.CANBERRA for SQL Server 2017 Analysis Services and Instance name of "CANBERRA"
    • MSRS14.CANBERRA 是指 SQL Server 2017 Reporting Services,“CANBERRA”指实例名称MSRS14.CANBERRA for SQL Server 2017 Reporting Services and Instance name of "CANBERRA"
  • 对于所有共享功能:For all shared features:

    子项 = HKEY_LOCAL_MACHINE\Software\Microsoft\Microsoft SQL Server{Major Version}Subkey = HKEY_LOCAL_MACHINE\Software\Microsoft\Microsoft SQL Server{Major Version}

    注册表项名称 = CustomerFeedbackRegEntry name = CustomerFeedback

    注册表项类型 DWORD:0 表示选择退出;1 表示选择加入Entry type DWORD: 0 is opt out; 1 is opt in

备注

{Major Version} 是指 SQL Server 的版本,例如,140 表示 SQL Server 2017{Major Version} refers to the version of SQL Server-for example, 140 for SQL Server 2017

设置故障转储收集的注册表子项Set registry subkeys for crash dump collection

与 SQL Server 早期版本的行为类似,SQL Server 2017 Enterprise 客户可以在服务器上配置组策略设置,以选择加入或退出故障转储收集。Similar to the behavior in an earlier version of SQL Server, SQL Server 2017 Enterprise customers can configure Group Policy settings on the server to opt in or out of crash dump collection. 这可通过配置基于注册表的策略完成。This is done by configuring a registry-based policy. 相关注册表子项和设置如下所示:The relevant registry subkeys and settings are as follows:

  • 对于 SQL Server 实例功能:For SQL Server instance features:

    子项 = HKEY_LOCAL_MACHINE\Software\Microsoft\Microsoft SQL Server{InstanceID}\CPESubkey = HKEY_LOCAL_MACHINE\Software\Microsoft\Microsoft SQL Server{InstanceID}\CPE

    注册表项名称 = EnableErrorReportingRegEntry name = EnableErrorReporting

    注册表项类型 DWORD:0 表示选择退出;1 表示选择加入Entry type DWORD: 0 is opt out; 1 is opt-in

    {InstanceID} 是指实例类型和实例,如以下示例所示:{InstanceID} refers to the instance type and instance, as in the following examples:

    • MSSQL14.CANBERRA 是指 SQL Server 2017 数据库引擎,“CANBERRA”指实例名称MSSQL14.CANBERRA for SQL Server 2017 Database engine and Instance name of "CANBERRA"
    • MSAS14.CANBERRA 是指 SQL Server 2017 Analysis Services,“CANBERRA”指实例名称MSAS14.CANBERRA for SQL Server 2017 Analysis Services and Instance name of "CANBERRA"
    • MSRS14.CANBERRA 是指 SQL Server 2017 Reporting Services,“CANBERRA”指实例名称MSRS14.CANBERRA for SQL Server 2017 Reporting Services and Instance name of "CANBERRA"
  • 对于所有共享功能:For all shared features:

    子项 = HKEY_LOCAL_MACHINE\Software\Microsoft\Microsoft SQL Server{Major Version}Subkey = HKEY_LOCAL_MACHINE\Software\Microsoft\Microsoft SQL Server{Major Version}

    注册表项名称 = EnableErrorReportingRegEntry name = EnableErrorReporting

    注册表项类型 DWORD:0 表示选择退出;1 表示选择加入Entry type DWORD: 0 is opt out; 1 is opt-in

备注

{Major Version} 是指 SQL Server 的版本。{Major Version} refers to the version of SQL Server. 例如,“140”是指 SQL Server 2017。For example, "140" refers to SQL Server 2017.

这些注册表子项上基于注册表的组策略适用于 SQL Server 2017 故障转储收集。Registry-based Group Policy on these registry subkeys is honored by SQL Server 2017 crash dump collection.

SSMS 的故障转储收集Crash dump collection for SSMS

SSMS 不会收集其自身的故障转储。SSMS doesn't collect its own crash dump. 与 SSMS 相关的任何故障转储都作为 Windows 错误报告的一部分进行收集。Any crash dump that's related to SSMS is collected as part of Windows Error Reporting.

启用或禁用此功能的过程取决于操作系统版本。The procedure to turn this feature on or off is dependent on the OS version. 要启用或禁用该功能,请按照 Windows 版本相应文章中的步骤操作。To turn the feature on or off, follow the steps in the appropriate article for your Windows version.

对于 Analysis Services 的反馈Feedback for Analysis Services

在安装过程中,SQL Server 2016 Analysis Services 向 Analysis Services 实例添加一个特殊帐户。During installation, SQL Server 2016 Analysis Services adds a special account to your Analysis Services instance. 此帐户是 Analysis Services 服务器管理员角色的成员。This account is a member of the Analysis Services Server Admin role. 该帐户用于收集来自 Analysis Services 实例的反馈信息。The account is used to collect information for feedback from the Analysis Services instance.

可以将服务配置为,不发送使用情况和诊断数据,如“在服务器上设置注册表子项”部分所述。You can configure your service not to send usage and diagnostic data, as described in the "Set registry subkeys on the server" section. 但是,执行此操作不会删除服务帐户。However, doing this does not remove the service account.

获取帮助