Skip to content

Commit 0e4ebf7

Browse files
authored
Merge pull request #33399 from sasapopo/sql-tranrepl-dmk
Adding paragraph that covers DMK usage for Tran Repl configuration.
2 parents 615e4a5 + 089b925 commit 0e4ebf7

File tree

1 file changed

+28
-2
lines changed

1 file changed

+28
-2
lines changed

docs/relational-databases/replication/security/replication-security-best-practices.md

Lines changed: 28 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -59,8 +59,34 @@ helpviewer_keywords:
5959

6060
- Ensure that a given agent (for example the Distribution Agent for a subscription) makes connections under the same account at each computer.
6161

62-
- In situations that require [!INCLUDE[ssNoVersion](../../../includes/ssnoversion-md.md)] Authentication, access to UNC snapshot shares is often not available (for example access might be blocked by a firewall). In this case, you can transfer the snapshot to Subscribers through file transfer protocol (FTP). For more information, see [Transfer Snapshots Through FTP](../../../relational-databases/replication//publish/deliver-a-snapshot-through-ftp.md).
63-
62+
- In situations that require [!INCLUDE[ssNoVersion](../../../includes/ssnoversion-md.md)] Authentication, access to UNC snapshot shares is often not available (for example access might be blocked by a firewall). In this case, you can transfer the snapshot to Subscribers through file transfer protocol (FTP). For more information, see [Transfer Snapshots Through FTP](../../../relational-databases/replication//publish/deliver-a-snapshot-through-ftp.md).
63+
64+
## Improve security posture with database master key
65+
66+
When using SQL Server authentication for replication, secrets that you provide when you configure replication are stored within SQL Server — specifically, in the distribution database and, for pull subscriptions, also in the subscriber database.
67+
68+
To enhance the security posture for replication, **before you *start* to configure replication**:
69+
70+
- Create a [database master key (DMK)](../../../t-sql/statements/create-master-key-transact-sql.md) in the distribution database of the server that hosts the Distributor.
71+
- For *pull subscriptions*, also create a DMK in the subscriber database.
72+
73+
If replication was created before the DMK, first create the DMK, and then update replication secrets by updating passwords for replication jobs. You can update the job with the same password, or you can use a new password.
74+
75+
To update replication secrets, use one of the following relevant stored procedures to update passwords for replication jobs:
76+
77+
- [sp_changelogreader_agent](../../system-stored-procedures/sp-changelogreader-agent-transact-sql.md)
78+
- [sp_changesubscriber](../../system-stored-procedures/sp-changesubscriber-transact-sql.md)
79+
- [sp_changedistpublisher](../../system-stored-procedures/sp-changedistpublisher-transact-sql.md)
80+
- [sp_changepublication_snapshot](../../system-stored-procedures/sp-changepublication-snapshot-transact-sql.md)
81+
82+
83+
Configuring transactional replication without a DMK can result in SQL Server warning `14130` on:
84+
85+
- Azure SQL Managed Instance
86+
- SQL Server 2022 [CU18](/troubleshoot/sql/releases/sqlserver-2022/cumulativeupdate18) and later
87+
- SQL Server 2019 [CU31](/troubleshoot/sql/releases/sqlserver-2019/cumulativeupdate31) and later
88+
89+
6490
## Related content
6591

6692
- [Enable Encrypted Connections to the Database Engine (SQL Server Configuration Manager)](../../../database-engine/configure-windows/configure-sql-server-encryption.md)

0 commit comments

Comments
 (0)