How can we help you today? How can we help you today?

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?
Easyzone
0

Comments

12 comments

  • Ben_P

    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

    Ben_P
    0
  • tata
    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.

    tata
    0
  • noahharold
    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!
    noahharold
    0
  • prosohaib

    You can use Redgate SQL Data Compare to compare row counts between tables on different servers. While it focuses on data differences, you can run it from the command line with the /verbose flag to check row count differences. However, SQL Compare’s HTML report doesn’t natively include row counts.

    If you need a simple row count comparison, a custom SQL script or PowerShell command might be a better fit. Let us know if you’d like guidance on that!, Also checkout the guide here

    prosohaib
    0
  • johnharrys

    Redgate's SQL Data Compare doesn't have a built-in function to compare row counts, but you could use a SQL script to get row counts from both servers and compare them separately (Read More). If you'd like this feature added, consider posting in our UserVoice forum.

    johnharrys
    0
  • harrys

    Hi, thanks for reaching out! Redgate doesn’t have a built-in command-line tool specifically for row count comparison, but you could use SQL Data Compare or a custom script to achieve this. Let me know if you need more details!

    harrys
    0
  • lordbrawler

    Absolutely, this post was really helpful for users. I was having a lot of doubts on SQL with comparing HTML, and they are solved now. So, thank you again for this informative post. 

    BSD Brawl Download

    lordbrawler
    0
  • Kishini

    harrys can you please give me more details how i can achieve that with bsd brawl

    Kishini
    0
  • alexjames2

    Hi! Redgate SQL Compare doesn’t natively compare row counts or include them in its HTML reports (checkout). It focuses on schema differences, not data. However, Redgate SQL Data Compare can compare data and could be scripted via command line to highlight row differences. For just row counts, you might consider a custom script or PowerShell command to query both servers and compare row counts per table—then output the results alongside your SQL Compare report. Let me know if you'd like help setting that up!

    alexjames2
    0
  • ytmodapp

    To compare row counts of same-named tables across different servers via command line, use a SQL script with linked servers or PowerShell with queries. This helps track data consistency. Just like checking versions in YouTube MOD APK, this ensures both sources match perfectly.

    ytmodapp
    0
  • gurukumar

    To compare row counts of same-named tables across different servers via command line, use a SQL script with linked servers or PowerShell with queries. This helps track data consistency. Just like checking versions in Subway Surfers Mod APK Unlocked Version, this ensures both sources match perfectly.

    gurukumar
    0
  • bitlifeappapk

    SQL Data Compare CLI can compare row counts and output HTML—perfect for sync checks.

    Just like checking versions in bitlifeappapk, this ensures both sources match perfectly.

     

     

    bitlifeappapk
    0

Add comment

Please sign in to leave a comment.