Transaction Replication - Violation of PRIMARY
Transaction Replication - Violation of PRIMARY
We ran into an issue in our pre-prod environment last week where transnational replication
Categories wasn’t processing any data changes from publisher to subscriber.
Alias's (1)
Atlassian (3)
Attach DB (1)
AWS (1)
CHECKDB (7)
Code (1)
Codecademy (1) and you can see the outstanding commads in the “Undistributed Commands”
CodePlex (1)
Collations (1)
Con២�guration (3)
Curah (7)
Frameworks (2)
GIT (2)
GitHub (3)
GPO (1)
From this we can get the rest of the information we need to run sp_browsereplcmds.
High Availability (1)
1 </pre>
HTML / CSS (1)
2 <pre>/* Populate with details from Query 1*/
3 EXEC distribution.dbo.sp_browsereplcmds
Import Export Wizard (1) 4 @xact_seqno_start = '0x00000024000002F0000400000000' ,
5 @xact_seqno_end = '0x00000024000002F0000400000000' ,
Indexes (1) 6 @publisher_database_id = 1 ,
7 @article_id = 1 ,
Installs and Patching (5) 8 @command_id = 1
Instance Maintenance (2) This returns what we need to resolve the issue
Jenkins (5)
Kerberos (3)
The Command Column
Least Privilage (5)
MAPT (1)
MDW (1) From here we can query the subscriber table and delete the row with ID 3 that has data not
matching the publisher. (In my test example you can see i manually entered a record called
Monitoring (1)
“insert sub” with an ID 3 into the subscriber, which con២�icts with the publisher row which is ID
MSDB (3) 3 data “insert pub”.
NUnit (1)
Outlook (4)
Pester (3)
So to resolve the issue we simply need to delete the the subscriber row
Podcasts (1)
Pro២�ler (2)
After deleting the row, you just need to wait for replication to sync, and you will see
PsExec (1)
the “Undistributed Commands” go down to 0 again and the “Distributor To Subscriber History”
PSInfo (1) should show it as Running.
RedGate (1)
Replication (4)
Roles (1)
Schema (1)
Script (2)
Security (9)
Severity (1)
SharePoint (4)
Advertisements
SharePoint Designer 2013
(1)
shrink២�le (1)
Slack (2)
sp_attach_single_២�le_db (1)
sp_help_revlogin (1)
SQL Server Version (4) Table Variables vs Temp By Example : Transactional Transaction Log File is ២�lling
Tables Replication Sync with up on a database with
SQLBits (1) In "Table Variables" Backup log_reuse_wait_desc set to
In "By Example" replication
sqlcmd (2)
In "Replication"
sqlps (2)
SQLPX (1)
SQLSaturday (1)
SSIS (8)
SSRS (13)
SysInternals (2)
T-SQL (23)
Leave a Reply
Table Variables (1)
Transparent Data
Encryption (1)
Troubleshooting (10)
Blog at WordPress.com.
Troubleshooting Tools (1)
Users (1)
VBA (3)
Windows OS (3)
XML (2)
xp_cmdshell (3)