SQL Server Forums
Profile | Register | Active Topics | Members | Search | Forum FAQ
 
Register Now and get your question answered!
Username:
Password:
Save Password
Forgot your Password?

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

tkothari
Starting Member

USA
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


Thanks
Tina

sunitabeck
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 (http://weblogs.sqlteam.com/jeffs/archive/2004/11/10/2737.aspx) 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: http://msdn.microsoft.com/en-us/library/ms162843(v=sql.105).aspx
Go to Top of Page

Bustaz Kool
Flowing Fount of Yak Knowledge

USA
1644 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

chadmat
The Chadinator

USA
1974 Posts

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

-Chad
Go to Top of Page
  Previous Topic Topic Next Topic  
 New 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.05 seconds. Powered By: Snitz Forums 2000