Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

[Database Monitoring] Update sqlserver setup documentation to mention log shipping #20989

Merged
merged 6 commits into from
Jan 4, 2024
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
12 changes: 12 additions & 0 deletions content/en/database_monitoring/setup_sql_server/azure.md
Original file line number Diff line number Diff line change
Expand Up @@ -46,6 +46,10 @@ CREATE LOGIN datadog WITH PASSWORD = '<PASSWORD>';
CREATE USER datadog FOR LOGIN datadog;
ALTER SERVER ROLE ##MS_ServerStateReader## ADD MEMBER datadog;
ALTER SERVER ROLE ##MS_DefinitionReader## ADD MEMBER datadog;
-- To use Log Shipping Monitoring (available in Agent v7.50+), uncomment the next three lines:
-- USE msdb;
-- CREATE USER datadog FOR LOGIN datadog;
-- GRANT SELECT to datadog;
```

Grant the Agent access to each additional Azure SQL Database on this server:
Expand Down Expand Up @@ -101,6 +105,10 @@ CREATE USER datadog FOR LOGIN datadog;
GRANT CONNECT ANY DATABASE to datadog;
GRANT VIEW SERVER STATE to datadog;
GRANT VIEW ANY DEFINITION to datadog;
-- To use Log Shipping Monitoring (available in Agent v7.50+), uncomment the next three lines:
-- USE msdb;
-- CREATE USER datadog FOR LOGIN datadog;
-- GRANT SELECT to datadog;
```

#### For SQL Server 2012
Expand All @@ -110,6 +118,10 @@ CREATE LOGIN datadog WITH PASSWORD = '<PASSWORD>';
CREATE USER datadog FOR LOGIN datadog;
GRANT VIEW SERVER STATE to datadog;
GRANT VIEW ANY DEFINITION to datadog;
-- To use Log Shipping Monitoring (available in Agent v7.50+), uncomment the next three lines:
-- USE msdb;
-- CREATE USER datadog FOR LOGIN datadog;
-- GRANT SELECT to datadog;

-- Create the `datadog` user in each additional application database:
USE [database_name];
Expand Down
4 changes: 3 additions & 1 deletion content/en/database_monitoring/setup_sql_server/rds.md
Original file line number Diff line number Diff line change
Expand Up @@ -22,7 +22,7 @@ Database Monitoring provides deep visibility into your Microsoft SQL Server data
Do the following steps to enable Database Monitoring with your database:

1. [Configure the AWS integration](#configure-the-aws-integration)
1. [Grant the Agent access to the database](#grant-the-agent-access)
1. [Grant the Agent access](#grant-the-agent-access)
1. [Install the Agent](#install-the-agent)
1. [Install the RDS integration](#install-the-rds-integration)

Expand Down Expand Up @@ -50,6 +50,8 @@ GO
--Set context to msdb database and create datadog user
USE [msdb];
CREATE USER datadog FOR LOGIN datadog;
-- To use Log Shipping Monitoring (available in Agent v7.50+), uncomment the next line:
-- GRANT SELECT to datadog;
GO
--Switch back to master and grant datadog user server permissions
USE [master];
Expand Down
12 changes: 10 additions & 2 deletions content/en/database_monitoring/setup_sql_server/selfhosted.md
Original file line number Diff line number Diff line change
Expand Up @@ -26,8 +26,8 @@ Database Monitoring provides deep visibility into your Microsoft SQL Server data

Do the following steps to enable Database Monitoring with your database:

1. [Grant the Agent access to the database](#grant-the-agent-access)
2. [Install the Agent](#install-the-agent)
1. [Grant the Agent access](#grant-the-agent-access)
1. [Install the Agent](#install-the-agent)

## Before you begin

Expand All @@ -51,6 +51,10 @@ CREATE USER datadog FOR LOGIN datadog;
GRANT CONNECT ANY DATABASE to datadog;
GRANT VIEW SERVER STATE to datadog;
GRANT VIEW ANY DEFINITION to datadog;
-- To use Log Shipping Monitoring (available in Agent v7.50+), uncomment the next three lines:
-- USE msdb;
-- CREATE USER datadog FOR LOGIN datadog;
-- GRANT SELECT to datadog;
```
{{% /tab %}}
{{% tab "SQL Server 2012" %}}
Expand All @@ -60,6 +64,10 @@ CREATE LOGIN datadog WITH PASSWORD = '<PASSWORD>';
CREATE USER datadog FOR LOGIN datadog;
GRANT VIEW SERVER STATE to datadog;
GRANT VIEW ANY DEFINITION to datadog;
-- To use Log Shipping Monitoring (available in Agent v7.50+), uncomment the next three lines:
-- USE msdb;
-- CREATE USER datadog FOR LOGIN datadog;
-- GRANT SELECT to datadog;
```

Create the `datadog` user in each additional application database:
Expand Down
Loading