take a new snapshot generate lock in SQL replication

szh8866-8371 140 Reputation points
2024-02-27T10:36:29.9+00:00

we have transactional replication. since the data between publisher and subscriber are out of sync. we try to take a new snapshot. our system have multiple update/insert/delete processing running. the snapshot is stuck in "[99%] Locking published tables while generating the snapshot" for hours. how to complete the snapshot? What would happen if the new snapshot is stopped when it reaches to the re-trial limits . The SQL is 2017.

SQL Server
SQL Server
A family of Microsoft relational database management and analysis systems for e-commerce, line-of-business, and data warehousing solutions.
14,492 questions
0 comments No comments
{count} votes

1 answer

Sort by: Most helpful
  1. Zahid Butt 956 Reputation points
    2024-02-27T12:32:26.7533333+00:00

    Hi, Its better to stop synchronize on subscription. Then reinitialize subscription & follow steps to generate snapshot. In worst case , you may drop subscription & add it again but its better you do all this out of production window. Hope this helps. Thanks.


Your answer

Answers can be marked as Accepted Answers by the question author, which helps users to know the answer solved the author's problem.