如何关闭SQL 2016的遥测功能

时间:2017-04-21 17:32:22

标签: sql-server

安装SQL 2016会自动打开所有“CEIP”或客户体验改善计划元素。这些元素向Microsoft报告安装体验的各个方面以及功能使用情况。我想把它关掉,因为无论如何它都被我们的防火墙阻挡了,我不需要头疼。

5 个答案:

答案 0 :(得分:24)

事实证明,这样做似乎很容易。设置以下注册表项:

HKEY_LOCAL_MACHINE\Software\Microsoft\Microsoft SQL Server\130\CustomerFeedback=0
HKEY_LOCAL_MACHINE\Software\Microsoft\Microsoft SQL Server\130\EnableErrorReporting=0
HKEY_LOCAL_MACHINE\Software\Microsoft\Microsoft SQL Server\MSAS13.TESTINSTANCE\CPE\CustomerFeedback=0
HKEY_LOCAL_MACHINE\Software\Microsoft\Microsoft SQL Server\MSAS13.TESTINSTANCE\CPE\EnableErrorReporting=0
HKEY_LOCAL_MACHINE\Software\Microsoft\Microsoft SQL Server\MSRS13.TESTINSTANCE\CPE\CustomerFeedback=0
HKEY_LOCAL_MACHINE\Software\Microsoft\Microsoft SQL Server\MSRS13.TESTINSTANCE\CPE\EnableErrorReporting=0
HKEY_LOCAL_MACHINE\Software\Microsoft\Microsoft SQL Server\MSSQL13.TESTINSTANCE\CPE\CustomerFeedback=0
HKEY_LOCAL_MACHINE\Software\Microsoft\Microsoft SQL Server\MSSQL13.TESTINSTANCE\CPE\EnableErrorReporting=0
HKEY_LOCAL_MACHINE\Software\Wow6432Node\Microsoft\Microsoft SQL Server\130\CustomerFeedback=0
HKEY_LOCAL_MACHINE\Software\Wow6432Node\Microsoft\Microsoft SQL Server\130\EnableErrorReporting=0

如果任何密钥不存在,那就没问题,因为您显然没有安装该功能。

禁用以下服务:

SQL Analysis Services CEIP
SQL Server CEIP service
SQL Server Integration Services CEIP service 13.0

答案 1 :(得分:14)

这是一个Powershell脚本,它将禁用所有遥测CEIP服务,并将更新注册表以禁用CustomerFeedback和EnableErrorReporting:

Get-Service | 
    Where-Object { $_.Name -like '*telemetry*' -or $_.DisplayName -like '*CEIP*' } | 
    ForEach-Object { 
        $servicename = $_.Name; 
        $displayname = $_.DisplayName; 
        Set-Service -Name $servicename  -StartupType Disabled 
        $serviceinfo = Get-Service -Name $servicename 
        $startup = $serviceinfo.StartType
        Write-Host "$servicename : $startup : $displayname";  
    }

Set-Location "HKLM:\"
$sqlentries = @( "\Software\Microsoft\Microsoft SQL Server\", "\Software\Wow6432Node\Microsoft\Microsoft SQL Server\" ) 
Get-ChildItem -Path $sqlentries -Recurse |
    ForEach-Object {
        $keypath = $_.Name
        (Get-ItemProperty -Path $keypath).PSObject.Properties |
             Where-Object { $_.Name -eq "CustomerFeedback" -or $_.Name -eq "EnableErrorReporting" } |
             ForEach-Object {
                $itemporpertyname = $_.Name
                $olditemporpertyvalue = Get-ItemPropertyValue -Path $keypath -Name $itemporpertyname
                Set-ItemProperty  -Path $keypath -Name $itemporpertyname -Value 0
                $newitemporpertyvalue = Get-ItemPropertyValue -Path $keypath -Name $itemporpertyname
                Write-Host "$keypath.$itemporpertyname = $olditemporpertyvalue --> $newitemporpertyvalue" 
             }
    }

答案 2 :(得分:4)

您还可以使用"错误和使用情况报告设置"与Microsoft SQL Server 2016一起安装的应用程序。

article 显示漂亮图片的详细信息。可能会保存胖指针编辑您的注册表。在我的测试中,它不需要重新启动服务,它只是起作用。

答案 3 :(得分:3)

Necromancing。
快速修复版本:

Windows Registry Editor Version 5.00

[HKEY_LOCAL_MACHINE\SOFTWARE\Microsoft\Microsoft SQL Server\130]
"EnableErrorReporting"=dword:00000000
"CustomerFeedback"=dword:00000000

[HKEY_LOCAL_MACHINE\SOFTWARE\Wow6432Node\Microsoft\Microsoft SQL Server\130]
"EnableErrorReporting"=dword:00000000
"CustomerFeedback"=dword:00000000




[HKEY_LOCAL_MACHINE\SOFTWARE\Microsoft\Microsoft SQL Server\MSSQL13.MSSQLSERVER\CPE]
"EnableErrorReporting"=dword:00000000
"CustomerFeedback"=dword:00000000

[HKEY_LOCAL_MACHINE\SOFTWARE\Microsoft\Microsoft SQL Server\MSAS13.MSSQLSERVER\CPE]
"EnableErrorReporting"=dword:00000000
"CustomerFeedback"=dword:00000000

[HKEY_LOCAL_MACHINE\SOFTWARE\Microsoft\Microsoft SQL Server\MSRS13.MSSQLSERVER\CPE]
"EnableErrorReporting"=dword:00000000
"CustomerFeedback"=dword:00000000

使用您的实例名称搜索并替换MSSQLSERVER。

答案 4 :(得分:0)

如果有人使用下面的Powershell所需状态配置(sqlserverdsc / sqlsetup)进行安装,则将处理db引擎和SSIS遥测服务。我确定您可以修改以前为AS / RS发布的其他注册表值。假定使用SQL 2016和默认的命名实例,并且您将使用computermanagementdsc。


        Registry RegistrySqlIsCustFeedback
        {
            Ensure      = "Present"  # You can also set Ensure to "Absent"
            Key         = "HKEY_LOCAL_MACHINE\SOFTWARE\Microsoft\Microsoft SQL Server\MSSQL13.MSSQLSERVER\CPE"
            ValueType   = "Dword"
            ValueName   = "CustomerFeedback"
            ValueData   = "0"
        }

        Registry RegistrySqlIsErrReporting
        {
            Ensure      = "Present"  # You can also set Ensure to "Absent"
            Key         = "HKEY_LOCAL_MACHINE\SOFTWARE\Microsoft\Microsoft SQL Server\MSSQL13.MSSQLSERVER\CP"
            ValueType   = "Dword"
            ValueName   = "EnableErrorReporting"
            ValueData   = "0"
        }
        
        Registry RegistrySqlCustFeedback64
        {
            Ensure      = "Present"  # You can also set Ensure to "Absent"
            Key         = "HKEY_LOCAL_MACHINE\SOFTWARE\Wow6432Node\Microsoft\Microsoft SQL Server\130"
            ValueType   = "Dword"
            ValueName   = "CustomerFeedback"
            ValueData   = "0"
        }
        Registry RegistryErrReporting64
        {
            Ensure      = "Present"  # You can also set Ensure to "Absent"
            Key         = "HKEY_LOCAL_MACHINE\SOFTWARE\Wow6432Node\Microsoft\Microsoft SQL Server\130"
            ValueType   = "Dword"
            ValueName   = "EnableErrorReporting"
            ValueData   = "0"
        }
        Registry RegistrySqlCustFeedback
        {
            Ensure      = "Present"  # You can also set Ensure to "Absent"
            Key         = "HKEY_LOCAL_MACHINE\SOFTWARE\Microsoft\Microsoft SQL Server\130"
            ValueType   = "Dword"
            ValueName   = "CustomerFeedback"
            ValueData   = "0"
        }
        Registry RegistryErrReporting
        {
            Ensure      = "Present"  # You can also set Ensure to "Absent"
            Key         = "HKEY_LOCAL_MACHINE\SOFTWARE\Microsoft\Microsoft SQL Server\130"
            ValueType   = "Dword"
            ValueName   = "EnableErrorReporting"
            ValueData   = "0"
        }