Please start any new threads on our new site at We've got lots of great SQL Server experts to answer whatever question you can come up with.

Our new SQL Server Forums are live! Come on over! We've restricted the ability to create new threads on these forums.

SQL Server Forums
Profile | Active Topics | Members | Search | Forum FAQ
Save Password
Forgot your Password?

 All Forums
 General SQL Server Forums
 New to SQL Server Administration
 Table comparision
 Reply to Topic
 Printer Friendly
Author Previous Topic Topic Next Topic  

Starting Member

3 Posts

Posted - 11/01/2012 :  14:50:51  Show Profile  Reply with Quote
I have 2 tables each table has 45 million rows, I want to make sure the data are same in both the table, I did the row count and it's coming same for both the table, is there any other way i can make sure data are also same


Flowing Fount of Yak Knowledge

5155 Posts

Posted - 11/01/2012 :  15:15:51  Show Profile  Reply with Quote
I suspect the usual approaches such as EXCEPT, UNION ALL ( etc. may be a non-started for you because of the amount of data involved.

I have no direct experience with the tablediff utility, but you might want to give that a try:
Go to Top of Page

Bustaz Kool
Flowing Fount of Yak Knowledge

1834 Posts

Posted - 11/02/2012 :  18:36:52  Show Profile  Reply with Quote
RedGate does have a SQL Data Compare utility but it won't be fast on tables this size. Alternately, you could use the CHECKSUM function to compare the table values. Another approach, if you only want to assure that the second table is identical to the first, would be to truncate the second table and copy the first table into the second.

We are far more concerned about the desecration of the flag than we are about the desecration of our land. -Wendell Berry
Go to Top of Page

The Chadinator

1974 Posts

Posted - 11/02/2012 :  18:50:47  Show Profile  Visit chadmat's Homepage  Reply with Quote
Use tablediff

Go to Top of Page
  Previous Topic Topic Next Topic  
 Reply to Topic
 Printer Friendly
Jump To:
SQL Server Forums © 2000-2009 SQLTeam Publishing, LLC Go To Top Of Page
This page was generated in 0.02 seconds. Powered By: Snitz Forums 2000