dbatools icon indicating copy to clipboard operation
dbatools copied to clipboard

Possible new feature: "check and manage SQL-Server-Telemetry for resource and privacy/compliance reasons"

Open Totty1973g opened this issue 6 years ago • 10 comments

Summary of new feature

I want to be able to check and manage the telemetry in newer versions of sql server, for resource and privacy/compliance reason, my focus is turning this off, but sometimes turing on later can be desired. see also https://www.brentozar.com/archive/2019/02/what-queries-does-microsofts-telemetry-service-run-on-your-sql-server/ I'm willing to contribute.

Proposed technical details (if applicable)

there are a few registry settings involved, and window-service(s) can be disabled (or re-enabled if desired)

Latest version of dbatools as of writing

  • Please provide the latest released version of dbatools module.

1.0.77

Totty1973g avatar Dec 25 '19 09:12 Totty1973g

Basic information for managing these services is at

https://blog.dbi-services.com/sql-server-tips-deactivate-the-customer-experience-improvement-program-ceip/

sqllensman avatar Jan 26 '20 15:01 sqllensman

This issue has been automatically marked as stale because it has not had recent activity. If you would like this issue to remain open:

  • Verify that you can still reproduce the issue in the latest version of dbatools
  • Comment that the issue is still reproducible and include:
    • What version of dbatools you reproduced the issue on
    • What OS and version you reproduced the issue on
    • What steps you followed to reproduce the issue

stale[bot] avatar Mar 26 '20 15:03 stale[bot]

This issue has been automatically closed because it has not had activity in the last three months. If this issue is still valid, please add a comment

stale[bot] avatar Jul 25 '20 04:07 stale[bot]

This would be a really cool feature. I guess it would be an Enable-DbaTelemetry and Disable-DbaTelemetry at least the below parameters. There might have to be a discovery cmdlet to get the CEIP/Telemetry services.

  • ComputerName
  • Service

mattcargile avatar Dec 14 '22 15:12 mattcargile

let's reopen then

niphlod avatar Dec 14 '22 15:12 niphlod

The Get-DbaService command should handle getting this service.

I'd say we should have an Enable/Disable-DbaService to handle any of the services involved with SQL Server.

wsmelton avatar Dec 14 '22 19:12 wsmelton

The Get-DbaService command should handle getting this service.

I'd say we should have an Enable/Disable-DbaService to handle any of the services involved with SQL Server.

I see. I like that. So create Enable-DbaService and Disable-DbaService and then edit Get-DbaService to get the services. So where should the editing of these keys go? Below are the keys from SQL Server 2019. Should there still be an Enable-DbaTelemetry and Disable-DbaTelemetry which would wrap the modification of these keys plus the execution of the Enable-DbaService and Disable-DbaService, respectively?

HKLM\SOFTWARE\Microsoft\Microsoft SQL Server\150\EnableErrorReporting
HKLM\SOFTWARE\WOW6432Node\Microsoft\Microsoft SQL Server\150\CustomerFeedback
HKLM\SOFTWARE\WOW6432Node\Microsoft\Microsoft SQL Server\150\EnableErrorReporting
HKLM\SOFTWARE\Microsoft\Microsoft SQL Server\MSSQL15.MSSQLSERVER\CPE\CustomerFeedback
HKLM\SOFTWARE\Microsoft\Microsoft SQL Server\MSSQL15.MSSQLSERVER\CPE\EnableErrorReporting
HKLM:\SOFTWARE\Microsoft\Microsoft SQL Server\SSRS\CPE\CustomerFeedback
HKLM:\SOFTWARE\Microsoft\Microsoft SQL Server\SSRS\CPE\CustomerFeedback

EDIT: Adding SSRS keys for default 2019 install.

mattcargile avatar Dec 15 '22 00:12 mattcargile

Oh I thought this was a service. Yeah just have enable- and disable- like you started should be fine.

If it requires a restart to take effect that will be on the user to perform, we just spit out a warning stating as much.

wsmelton avatar Dec 15 '22 00:12 wsmelton

Oh I thought this was a service. Yeah just have enable- and disable- like you started should be fine.

If it requires a restart to take effect that will be on the user to perform, we just spit out a warning stating as much.

Well it is a service as well. There is one for the engine and SSIS and SSAS. I think it is still a good discussion on how to structure the cmdlets. It might be sufficient to only edit the registry. When I opened the Error Reporting GUI tool and unchecked all the boxes, it left the service as is ( e.g. running and in Automatic start mode). :-\

mattcargile avatar Dec 15 '22 06:12 mattcargile

This is referring to CEIP service? I recall discussing this at some point and nothing that Microsoft didn't support disabling that service only turning off the data collection

Turning off the collection is just the registry key.

wsmelton avatar Dec 15 '22 10:12 wsmelton