---
title: >-
  SQL Server instances should have the `3625 (trace flag)` database flag set to
  'on'
description: Datadog, the leading service for cloud-scale monitoring.
breadcrumbs: >-
  Docs > Datadog Security > OOTB Rules > SQL Server instances should have the
  `3625 (trace flag)` database flag set to 'on'
---

> For the complete documentation index, see [llms.txt](https://docs.datadoghq.com/llms.txt).

# SQL Server instances should have the `3625 (trace flag)` database flag set to 'on'
 
## Description{% #description %}

This rule fails when a Cloud SQL for SQL Server instance does not set the `3625` (trace flag) database flag to `on`. Trace flag 3625 masks the parameters of some error messages with `******` for users who are not members of the `sysadmin` fixed server role, which limits the information disclosed in errors. An instance that does not set the flag fails, because SQL Server trace flags are off unless set. Values are compared case-insensitively, and the instance fails if any `3625` entry has a value other than `on`. Instances running other database engines are skipped, and an instance with a missing or unspecified database version fails because its engine cannot be determined. A database flag with no name also fails, because it could be `3625`.

## Remediation{% #remediation %}

Setting this flag restarts the instance. For the flagged instance, set `3625` to `on` by following [Configure database flags](https://docs.cloud.google.com/sql/docs/sqlserver/flags).

## References{% #references %}

- [SQL Server trace flags](https://learn.microsoft.com/en-us/sql/t-sql/database-console-commands/dbcc-traceon-trace-flags-transact-sql)
- [CIS Google Cloud Platform Foundation Benchmark](https://www.cisecurity.org/benchmark/google_cloud_computing_platform)
