--- title: Configure Usage and Diagnostic Data Collection for SQL Server on Linux description: Describes how SQL Server customer usage and diagnostic data is collected and configured on Linux. author: rwestMSFT ms.author: randolphwest ms.date: 01/02/2026 ms.service: sql ms.subservice: linux ms.topic: how-to ms.custom: - linux-related-content - build-2025 - sfi-ropc-blocked --- # Configure usage and diagnostic data collection for SQL Server on Linux [!INCLUDE [SQL Server - Linux](../includes/applies-to-version/sql-linux.md)] By default, [!INCLUDE [msconame-md](../includes/msconame-md.md)] collects information about how its customers use [!INCLUDE [ssnoversion-md](../includes/ssnoversion-md.md)]. Specifically, [!INCLUDE [ssnoversion-md](../includes/ssnoversion-md.md)] collects information about the installation experience, usage, and performance. This information helps [!INCLUDE [msconame-md](../includes/msconame-md.md)] improve the product to better meet customer needs. For example, [!INCLUDE [msconame-md](../includes/msconame-md.md)] collects information about what kinds of error codes customers encounter so that we can fix related bugs, improve our documentation about how to use [!INCLUDE [ssnoversion-md](../includes/ssnoversion-md.md)], and determine whether features should be added to the product to better serve customers. This document provides details about what kind of information is collected, and about how to configure [!INCLUDE [ssnoversion-md](../includes/ssnoversion-md.md)] on Linux to send that collected information to [!INCLUDE [msconame-md](../includes/msconame-md.md)]. [!INCLUDE [ssnoversion-md](../includes/ssnoversion-md.md)] includes a privacy statement that explains what information we do and don't collect from users. For more information, see the [privacy statement](../sql-server/sql-server-privacy.md). Specifically, [!INCLUDE [msconame-md](../includes/msconame-md.md)] doesn't send any of the following types of information through this mechanism: - Any values from inside user tables - Any sign-in credentials or other authentication information - Personal data [!INCLUDE [ssnoversion-md](../includes/ssnoversion-md.md)] 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. [!INCLUDE [ssnoversion-md](../includes/ssnoversion-md.md)] can be configured not to send information (on a per-server instance basis) to [!INCLUDE [msconame-md](../includes/msconame-md.md)] through **mssql-conf**. **mssql-conf** is a configuration script that installs with [!INCLUDE [ssnoversion-md](../includes/ssnoversion-md.md)] for Red Hat Enterprise Linux, SUSE Linux Enterprise Server, and Ubuntu. > [!NOTE] > You can disable the sending of information to [!INCLUDE [msconame-md](../includes/msconame-md.md)] only in paid versions of [!INCLUDE [ssnoversion-md](../includes/ssnoversion-md.md)]. ## Disable usage and diagnostic data collection This option lets you change if [!INCLUDE [ssnoversion-md](../includes/ssnoversion-md.md)] sends usage and diagnostic data collection to [!INCLUDE [msconame-md](../includes/msconame-md.md)] or not. By default, this value is set to true. To change the value, run the following commands: > [!IMPORTANT] > You can not turn off usage and diagnostic data collection for free editions of [!INCLUDE [ssnoversion-md](../includes/ssnoversion-md.md)], Express and Developer. ### On Red Hat, SUSE, and Ubuntu 1. Run the **mssql-conf** script as root with the `set` command for `telemetry.customerfeedback`. The following example turns off usage and diagnostic data collection by specifying `false`. ```bash sudo /opt/mssql/bin/mssql-conf set telemetry.customerfeedback false ``` 1. Restart the [!INCLUDE [ssnoversion-md](../includes/ssnoversion-md.md)] service: ```bash sudo systemctl restart mssql-server ``` ### In a Linux container To disable usage and diagnostic data collection in a Linux container, you must have the container [persist your data](sql-server-linux-docker-container-deployment.md). ::: moniker range="=sql-server-linux-2017 || =sql-server-2017" 1. Add an `mssql.conf` file with the lines `[telemetry]` and `customerfeedback = false` in the host directory: ```bash echo '[telemetry]' >> /mssql.conf ``` ```bash echo 'customerfeedback = false' >> /mssql.conf ``` 1. Run the container image: > [!IMPORTANT] > The `SA_PASSWORD` environment variable is deprecated. Use `MSSQL_SA_PASSWORD` instead. ```bash docker run -e 'ACCEPT_EULA=Y' -e 'MSSQL_SA_PASSWORD=' -p 1433:1433 -v :/var/opt/mssql -d mcr.microsoft.com/mssql/server:2017-latest ``` ```powershell docker run -e "ACCEPT_EULA=Y" -e "MSSQL_SA_PASSWORD=" -p 1433:1433 -v :/var/opt/mssql -d mcr.microsoft.com/mssql/server:2017-latest ``` ::: moniker-end ::: moniker range="=sql-server-linux-ver15 || =sql-server-ver15" 1. Add an `mssql.conf` file with the lines `[telemetry]` and `customerfeedback = false` in the host directory: ```bash echo '[telemetry]' >> /mssql.conf ``` ```bash echo 'customerfeedback = false' >> /mssql.conf ``` 1. Run the container image: > [!IMPORTANT] > The `SA_PASSWORD` environment variable is deprecated. Use `MSSQL_SA_PASSWORD` instead. ```bash docker run -e 'ACCEPT_EULA=Y' -e 'MSSQL_SA_PASSWORD=' -p 1433:1433 -v :/var/opt/mssql -d mcr.microsoft.com/mssql/server:2019-latest ``` ```powershell docker run -e "ACCEPT_EULA=Y" -e "MSSQL_SA_PASSWORD=" -p 1433:1433 -v :/var/opt/mssql -d mcr.microsoft.com/mssql/server:2019-latest ``` ::: moniker-end ::: moniker range=">=sql-server-linux-ver16 || >=sql-server-ver16" 1. Add an `mssql.conf` file with the lines `[telemetry]` and `customerfeedback = false` in the host directory: ```bash echo '[telemetry]' >> /mssql.conf ``` ```bash echo 'customerfeedback = false' >> /mssql.conf ``` 1. Run the container image: > [!IMPORTANT] > The `SA_PASSWORD` environment variable is deprecated. Use `MSSQL_SA_PASSWORD` instead. ```bash docker run -e 'ACCEPT_EULA=Y' -e 'MSSQL_SA_PASSWORD=' -p 1433:1433 -v :/var/opt/mssql -d mcr.microsoft.com/mssql/server:2022-latest ``` ```powershell docker run -e "ACCEPT_EULA=Y" -e "MSSQL_SA_PASSWORD=" -p 1433:1433 -v :/var/opt/mssql -d mcr.microsoft.com/mssql/server:2022-latest ``` ::: moniker-end > [!CAUTION] > [!INCLUDE [password-complexity](includes/password-complexity.md)] ## Local Audit for SQL Server on Linux usage and diagnostic data collection [!INCLUDE [ssnoversion-md](../includes/ssnoversion-md.md)] contains Internet-enabled features that can collect and send information about your computer or device ("standard computer information") to [!INCLUDE [msconame-md](../includes/msconame-md.md)]. The Local Audit component of [!INCLUDE [ssnoversion-md](../includes/ssnoversion-md.md)] usage and diagnostic data collection can write data collected by the service to a designated folder, representing the data (logs) that is sent to [!INCLUDE [msconame-md](../includes/msconame-md.md)]. The purpose of the Local Audit is to allow customers to see all data [!INCLUDE [msconame-md](../includes/msconame-md.md)] collects with this feature, for compliance, regulatory or privacy validation reasons. In [!INCLUDE [ssnoversion-md](../includes/ssnoversion-md.md)] on Linux, Local Audit is configurable at instance level for [!INCLUDE [ssnoversion-md](../includes/ssnoversion-md.md)] Database Engine. Other [!INCLUDE [ssnoversion-md](../includes/ssnoversion-md.md)] components and [!INCLUDE [ssnoversion-md](../includes/ssnoversion-md.md)] Tools don't have Local Audit capability for usage and diagnostic data collection. ### Enable Local Audit This option enables Local Audit and lets you set the directory where the Local Audit logs are created. 1. Create a target directory for new Local Audit logs. The following example creates a new `/tmp/audit` directory: ```bash sudo mkdir /tmp/audit ``` 1. Change the owner and group of the directory to the `mssql` user: ```bash sudo chown mssql /tmp/audit sudo chgrp mssql /tmp/audit ``` 1. Run the **mssql-conf** script as root with the `set` command for `telemetry.userrequestedlocalauditdirectory`: ```bash sudo /opt/mssql/bin/mssql-conf set telemetry.userrequestedlocalauditdirectory /tmp/audit ``` 1. Restart the [!INCLUDE [ssnoversion-md](../includes/ssnoversion-md.md)] service: ```bash sudo systemctl restart mssql-server ``` ### In a Linux container To enable Local Audit in a Linux container, you must have the container [persist your data](sql-server-linux-docker-container-deployment.md). ::: moniker range="=sql-server-linux-2017 || =sql-server-2017" 1. The target directory for new Local Audit logs will be in the container. Create a target directory for new Local Audit logs in the host directory on your machine. The following example creates a new `/audit` directory: ```bash sudo mkdir /audit ``` 1. Add an `mssql.conf` file with the lines `[telemetry]` and `userrequestedlocalauditdirectory = /audit` in the host directory: ```bash echo '[telemetry]' >> /mssql.conf ``` ```bash echo 'userrequestedlocalauditdirectory = /audit' >> /mssql.conf ``` 1. Run the container image: ```bash docker run -e 'ACCEPT_EULA=Y' -e 'MSSQL_SA_PASSWORD=' -p 1433:1433 -v :/var/opt/mssql -d mcr.microsoft.com/mssql/server:2017-latest ``` ```powershell docker run -e "ACCEPT_EULA=Y" -e "MSSQL_SA_PASSWORD=" -p 1433:1433 -v :/var/opt/mssql -d mcr.microsoft.com/mssql/server:2017-latest ``` ::: moniker-end ::: moniker range="=sql-server-linux-ver15 || =sql-server-ver15" 1. The target directory for new Local Audit logs will be in the container. Create a target directory for new Local Audit logs in the host directory on your machine. The following example creates a new `/audit` directory: ```bash sudo mkdir /audit ``` 1. Add an `mssql.conf` file with the lines `[telemetry]` and `userrequestedlocalauditdirectory = /audit` in the host directory: ```bash echo '[telemetry]' >> /mssql.conf ``` ```bash echo 'userrequestedlocalauditdirectory = /audit' >> /mssql.conf ``` 1. Run the container image: ```bash docker run -e 'ACCEPT_EULA=Y' -e 'MSSQL_SA_PASSWORD=' -p 1433:1433 -v :/var/opt/mssql -d mcr.microsoft.com/mssql/server:2019-latest ``` ```powershell docker run -e "ACCEPT_EULA=Y" -e "MSSQL_SA_PASSWORD=" -p 1433:1433 -v :/var/opt/mssql -d mcr.microsoft.com/mssql/server:2019-latest ``` ::: moniker-end ::: moniker range="=sql-server-linux-ver16 || =sql-server-ver16" 1. The target directory for new Local Audit logs will be in the container. Create a target directory for new Local Audit logs in the host directory on your machine. The following example creates a new `/audit` directory: ```bash sudo mkdir /audit ``` 1. Add an `mssql.conf` file with the lines `[telemetry]` and `userrequestedlocalauditdirectory = /audit` in the host directory: ```bash echo '[telemetry]' >> /mssql.conf ``` ```bash echo 'userrequestedlocalauditdirectory = /audit' >> /mssql.conf ``` 1. Run the container image: ```bash docker run -e 'ACCEPT_EULA=Y' -e 'MSSQL_SA_PASSWORD=' -p 1433:1433 -v :/var/opt/mssql -d mcr.microsoft.com/mssql/server:2022-latest ``` ```powershell docker run -e "ACCEPT_EULA=Y" -e "MSSQL_SA_PASSWORD=" -p 1433:1433 -v :/var/opt/mssql -d mcr.microsoft.com/mssql/server:2022-latest ``` ::: moniker-end ::: moniker range=">=sql-server-linux-ver17 || >=sql-server-ver17" 1. The target directory for new Local Audit logs will be in the container. Create a target directory for new Local Audit logs in the host directory on your machine. The following example creates a new `/audit` directory: ```bash sudo mkdir /audit ``` 1. Add an `mssql.conf` file with the lines `[telemetry]` and `userrequestedlocalauditdirectory = /audit` in the host directory: ```csharp echo '[telemetry]' >> /mssql.conf ``` ```php echo 'userrequestedlocalauditdirectory = /audit' >> /mssql.conf ``` 1. Run the container image: ```bash docker run -e 'ACCEPT_EULA=Y' -e 'MSSQL_SA_PASSWORD=' -p 1433:1433 -v :/var/opt/mssql -d mcr.microsoft.com/mssql/server:2025-latest ``` ```powershell docker run -e "ACCEPT_EULA=Y" -e "MSSQL_SA_PASSWORD=" -p 1433:1433 -v :/var/opt/mssql -d mcr.microsoft.com/mssql/server:2025-latest ``` ::: moniker-end > [!CAUTION] > [!INCLUDE [password-complexity](includes/password-complexity.md)] ## Related content - [What is SQL Server on Linux?](sql-server-linux-overview.md)