Command line to compare row counts same named tables across different servers

Hi, I am looking for a way to use Redgate to compare row counts on same named tables on different servers. We are are already syncronizing the data but need a command line tool that will just compare table row count by table name and report the differences. It would be handy to have these results as part of the SQL Compare html report ran from command line. Do you have the ability to do this with any of your command line tools?
Tagged:

Answers

  • Thank you for your post. I'm afraid SQL Data Compare doesn't have a function for counting the number of rows in each of the DBs that the comparison is run on. 

    If you'd like, though, you can post in our Uservoice forum if this is a feature you'd like to see in the future:

    https://redgate.uservoice.com/forums/147879-sql-data-compare

  • tatatata Posts: 1 New member
    Hyper-casual game development outsourcing studios are experts in creating quick, engaging games with simple mechanics and addictive gameplay loops. They can quickly develop high-quality prototypes to test concepts in the mobile market. Our hyper casual game development outsourcing services streamline the process for high-quality mobile games.

  • noahharoldnoahharold Posts: 1 New member
    edited January 6, 2025 7:28AM
    Hi Easyzone! While comparing row counts is essential, have you ever thought about how it reflects our "purity" in data management? Just like the Rice Purity Test, it’s all about keeping things in check! Good luck with your comparison tool!
  • glenn01glenn01 Posts: 2 New member

    Yes! Redgate’s SQL Data Compare command-line tool can help. While it primarily compares data differences, you can script it to fetch row counts from same-named tables across servers. Alternatively, you can use SQL Compare with a custom script to extract and include row count differences in the HTML report. Let me know if you need details!

  • glenn01glenn01 Posts: 2 New member

    Thanks for the clarification! It would be great to have a built-in row count feature in SQL Data Compare for quick insights. I’ll consider posting this suggestion on your UserVoice forum. Meanwhile, I’ll explore alternative methods to achieve this. If there are any workarounds or SQL scripts you’d recommend, please let me know. Appreciate your support!

Sign In or Register to comment.