As discussed in the previous lesson, P2P transactional replication can result in conflicts. Let's take a look at a conflict example in this section.
Note
You can refer to this link to find out more about conflicts and their types: https://docs.microsoft.com/en-us/sql/relational-databases/replication/transactional/peer-to-peer-conflict-detection-in-peer-to-peer-replication?view=sql-server-2017.
You will have to set up P2P replication using the scripts in Lesson 2, Transactional Replication, for this section.
Setup
To introduce the conflict into the replication, follow these steps:
Navigate to
C:\Code\Lesson03\Problem06
and open1_Setup.sql
and2_Setup.sql
in SSMS.Connect the query window for
1_Setup.sql
to the publisher and2_Setup.sql
to the subscriber.Quickly execute the two queries in parallel.
Troubleshooting
Whenever there is a conflict, a message is logged into the SQL Server...