Skip to content

Commit

Permalink
[Database Monitoring] Update sqlserver setup documentation to mention…
Browse files Browse the repository at this point in the history
… log shipping (#20989)

* [DBM] - Add documentation about monitoring log shipping in sqlserver

* azure

* Update content/en/database_monitoring/setup_sql_server/selfhosted.md

Co-authored-by: cecilia saixue watt <[email protected]>

* Update content/en/database_monitoring/setup_sql_server/azure.md

Co-authored-by: cecilia saixue watt <[email protected]>

* Apply suggestions from code review

Co-authored-by: cecilia saixue watt <[email protected]>

* empty push

---------

Co-authored-by: cecilia saixue watt <[email protected]>
  • Loading branch information
2 people authored and MaelNamNam committed Jan 17, 2024
1 parent e9b8b34 commit a60a24f
Show file tree
Hide file tree
Showing 3 changed files with 25 additions and 3 deletions.
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

0 comments on commit a60a24f

Please sign in to comment.