- 필수 기능
- 시작하기
- Glossary
- 표준 속성
- Guides
- Agent
- 통합
- 개방형텔레메트리
- 개발자
- Administrator's Guide
- API
- Datadog Mobile App
- CoScreen
- Cloudcraft
- 앱 내
- 서비스 관리
- 인프라스트럭처
- 애플리케이션 성능
- APM
- Continuous Profiler
- 스팬 시각화
- 데이터 스트림 모니터링
- 데이터 작업 모니터링
- 디지털 경험
- 소프트웨어 제공
- 보안
- AI Observability
- 로그 관리
- 관리
",t};e.buildCustomizationMenuUi=t;function n(e){let t='
",t}function s(e){let n=e.filter.currentValue||e.filter.defaultValue,t='${e.filter.label}
`,e.filter.options.forEach(s=>{let o=s.id===n;t+=``}),t+="${e.filter.label}
`,t+=`The Database Monitoring integrations collect aggregated query metrics, in-flight query executions, and query explain plans across your database. By default, query SQL texts and explain plans are obfuscated and normalized in the Agent before being sent to Datadog in order to protect sensitive data, which may be exposed in query parameters.
However, exposing query statements with actual parameter values provides enhanced observability and debugging capabilities. Database Monitoring currently supports query capture with parameter values on the PostgreSQL and SQL Server integrations.
Having access to query parameters enables:
org_id:12345
)You must configure Database Monitoring for your SQL Server instance before continuing with this guide.
To capture SQL query text and execution plans with parameter values, update the appropriate integration conf.yaml
file based on your database type:
postgres.d/conf.yaml
sqlserver.d/conf.yaml
collect_raw_query_statement:
enabled: true
For SQL Server, capturing parameter values from prepared statements requires enabling query completion capture via Extended Events. See configure your SQL Server instance and integration to capture query completions in order to complete the database set up.
xe_collection:
query_completions:
enabled: true
query_errors:
enabled: true
Prepared statement support is currently available only for SQL Server. For more details, see Why prepared statement parameter values are limited.
Query Execution Method | Support | Description | Example | Supported Agent Version |
---|---|---|---|---|
Direct Executions | Ad-hoc SQL statements executed directly, including literal values in the query text. | SELECT * FROM users WHERE id = 123 | 7.64.0+ | |
Functions | Scalar or table-valued functions invoked with SELECT. | SELECT get_user_name(123); | 7.64.0+ | |
Stored Procedures | Procedures invoked with CALL. | CALL procname(123) | 7.64.0+ | |
Prepared Statements | Not currently supported. See Why prepared statement parameter values are limited. Parameterized queries executed through prepared statements. Can be created explicitly or through drivers. | PREPARE stmt AS SELECT * FROM users WHERE id = $1; EXECUTE stmt(123); |
Query Execution Method | Support | Description | Example | Agent Version |
---|---|---|---|---|
Direct Executions | Ad-hoc SQL statements executed directly, including literal values in the query text. | SELECT * FROM users WHERE id = 123 | 7.64.0+ | |
Functions | Scalar or table-valued functions invoked with SELECT. | SELECT dbo.GetUserName(123); | 7.64.0+ | |
Stored Procedures | Procedures invoked with EXEC. | EXEC GetUser @id = 123; | 7.64.0+ | |
Prepared Statements | Support requires query completions configuration. Parameterized queries executed through prepared statements. Can be created explicitly or through drivers. | sp_prepare @handle, N'SELECT * FROM users WHERE id = @id'; sp_execute @handle, @id = 123; | 7.67.0+ |
Datadog uses activity sampling to capture currently running SQL queries. However, for prepared statements, the Database Management System replaces parameter values with placeholders at execution time. As a result, activity sampling cannot observe the actual values.
To capture prepared statements with parameter values in SQL Server, you must configure your SQL Server instance and integration to capture query completions, which provides the Datadog Agent rich visibility into prepared statement execution.
Support for PostgreSQL prepared statement parameter value capture is not available at this time.