You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
Copy file name to clipboardExpand all lines: docs/relational-databases/replication/troubleshoot-tran-repl-errors.md
+33-21Lines changed: 33 additions & 21 deletions
Display the source diff
Display the rich diff
Original file line number
Diff line number
Diff line change
@@ -2,7 +2,7 @@
2
2
title: "Find errors with transactional replication"
3
3
description: Describes how to locate and identify errors with Transactional Replication, as well as the troubleshooting methodology for addressing issues with replication.
4
4
ms.custom: seo-lt-2019
5
-
ms.date: "04/27/2018"
5
+
ms.date: 07/01/2020
6
6
ms.prod: sql
7
7
ms.reviewer: ""
8
8
ms.technology: replication
@@ -71,8 +71,10 @@ The Snapshot Agent generates the snapshot and writes it to the specified snapsho
71
71
72
72

73
73
74
-
The replication agent had encountered an exception.
75
-
Exception Message: Access to path '\\node1\repldata.....' is denied.
74
+
```console
75
+
The replication agent had encountered an exception.
76
+
Exception Message: Access to path '\\node1\repldata.....' is denied.
77
+
```
76
78
77
79
If your Windows permissions are not configured correctly for your snapshot folder, you'll see an "access is denied" error for the Snapshot Agent. You'll need to verify permissions to the folder where your snapshot is stored, and make sure that the account used to run the Snapshot Agent has permissions to access the share.
78
80
@@ -103,10 +105,12 @@ The Log Reader Agent connects to your publisher database and scans the transacti
103
105
104
106

105
107
106
-
Status: 0, code: 20011, text: 'The process could not execute 'sp_replcmds' on 'NODE1\SQL2016'.'.
107
-
The process could not execute 'sp_replcmds' on 'NODE1\SQL2016'.
108
-
Status: 0, code: 15517, text: 'Cannot execute as the database principal because the principal "dbo" does not exist, this type of principal cannot be impersonated, or you do not have permission.'.
109
-
Status: 0, code: 22037, text: 'The process could not execute 'sp_replcmds' on 'NODE1\SQL2016'.'.
108
+
```console
109
+
Status: 0, code: 20011, text: 'The process could not execute 'sp_replcmds' on 'NODE1\SQL2016'.'.
110
+
The process could not execute 'sp_replcmds' on 'NODE1\SQL2016'.
111
+
Status: 0, code: 15517, text: 'Cannot execute as the database principal because the principal "dbo" does not exist, this type of principal cannot be impersonated, or you do not have permission.'.
112
+
Status: 0, code: 22037, text: 'The process could not execute 'sp_replcmds' on 'NODE1\SQL2016'.'.
113
+
```
110
114
111
115
6. The error typically occurs when the owner of the publisher database is not set correctly. This can happen when a database is restored. To verify this:
112
116
@@ -122,7 +126,7 @@ The Log Reader Agent connects to your publisher database and scans the transacti
122
126
123
127
```sql
124
128
-- set the owner of the database to 'sa' or a specific user account, without the brackets.
125
-
EXEC sp_changedbowner '<useraccount>'
129
+
EXECUTE sp_changedbowner '<useraccount>'
126
130
-- example for sa: exec sp_changedbowner 'sa'
127
131
-- example for user account: exec sp_changedbowner 'sqlrepro\administrator'
128
132
```
@@ -153,9 +157,11 @@ The Distribution Agent finds data in the distribution database and then applies
153
157
2. The **Distributor to Subscriber History** dialog box opens and clarifies what error the agent is encountering:
154
158
155
159

156
-
157
-
Error messages:
158
-
Agent 'NODE1\SQL2016-AdventureWorks2012-AdvWorksProductTrans-NODE2\SQL2016-7' is retrying after an error. 89 retries attempted. See agent job history in the Jobs folder for more details.
160
+
161
+
```console
162
+
Error messages:
163
+
Agent 'NODE1\SQL2016-AdventureWorks2012-AdvWorksProductTrans-NODE2\SQL2016-7' is retrying after an error. 89 retries attempted. See agent job history in the Jobs folder for more details.
164
+
```
159
165
160
166
3. The error indicates that the Distribution Agent is retrying. To find more information, check the job history for the Distribution Agent:
161
167
@@ -170,9 +176,11 @@ The Distribution Agent finds data in the distribution database and then applies
170
176
5. Select one of the error entries and view the error text at the bottom of the window:
171
177
172
178

173
-
174
-
Message:
175
-
Unable to start execution of step 2 (reason: Error authenticating proxy NODE1\repl_distribution, system error: The user name or password is incorrect.)
179
+
180
+
```console
181
+
Message:
182
+
Unable to start execution of step 2 (reason: Error authenticating proxy NODE1\repl_distribution, system error: The user name or password is incorrect.)
183
+
```
176
184
177
185
6. This error indicates that the password that the Distribution Agent used is incorrect. To resolve it:
178
186
@@ -189,11 +197,13 @@ The Distribution Agent finds data in the distribution database and then applies
189
197
Open the **Distribution to Subscriber** history by right-clicking the subscription in **Replication Monitor** > **View Details**. Here, the error is now different:
190
198
191
199

192
-
193
-
Connecting to Subscriber 'NODE2\SQL2016'
194
-
Agent message code 20084. The process could not connect to Subscriber 'NODE2\SQL2016'.
195
-
Number: 18456
196
-
Message: Login failed for user 'NODE2\repl_distribution'.
200
+
201
+
```console
202
+
Connecting to Subscriber 'NODE2\SQL2016'
203
+
Agent message code 20084. The process could not connect to Subscriber 'NODE2\SQL2016'.
204
+
Number: 18456
205
+
Message: Login failed for user 'NODE2\repl_distribution'.
206
+
```
197
207
198
208
8. This error indicates that the Distribution Agent could not connect to the subscriber, because the login failed for user **NODE2\repl_distribution**. To investigate further, connect to the subscriber and open the *current* SQL Server error log under the **Management** node in Object Explorer:
199
209
@@ -229,8 +239,10 @@ You can use verbose logging to see more detailed information about errors occurr
229
239
230
240
1. In the **Command** box, start a new line, enter the following text, and select **OK**:
This default location contains the following files:
51
+
This default location contains the following files:
52
52
53
53
-**Language-specific** thesaurus files
54
54
55
55
Setup installs empty thesaurus files in the above location. A separate file is provided for each supported language. A system administrator can customize these files.
56
56
57
-
The default file names of the thesaurus files use following format:
57
+
The default file names of the thesaurus files use following format:
You can change the location and names of a thesaurus file by changing its registry key. For each language, the location of the thesaurus file is specified in the following value in the registry:
0 commit comments