Using T-SQL to Verify Tables Row Counts in Transactional Replication

  • use bracket [ ] around your db and linked server; like [DatabaseName] [linkedServer].
    '['+cast (ss2.data_source as varchar)+']',

  • Thanks for this solution, this helped me immensely to quickly identify some issues I've been having with my replication.

    However, just to add to help others,  if you are replicating to Azure SQL DB, you will have to remove the following from the joins to make this work:

    + @sub_srv + '.' + @sub_db +

    Additionally, I've read the comments regarding the built in validation stored procs to do the same job, does anyone have any examples of this? Thanks in advance!

Viewing 2 posts - 16 through 16 (of 16 total)

You must be logged in to reply to this topic. Login to reply