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
Register Now and get your question answered!
Save Password
Forgot your Password?

 All Forums
 General SQL Server Forums
 New to SQL Server Administration
 compare two database tables
 Reply to Topic
 Printer Friendly
Author Previous Topic Topic Next Topic  

Yak Posting Veteran

53 Posts

Posted - 12/29/2012 :  11:59:47  Show Profile  Reply with Quote

I have two dbs one running in DBS1(maindb), and another in DBS3(historydb), all the tables and structures are same. I am missing some rows in particular table in historydb(telling by count) basically its for my bk application purpose. is there any solution to compare both tables and catch it, so that i can restored it from original db.

thanks in advance.

both can be connected in LAN


Aged Yak Warrior

819 Posts

Posted - 12/30/2012 :  10:34:28  Show Profile  Reply with Quote
Take a look at Redgate's SQL Data Compare has a fully-functional trial version that you can use. If that is not something you can use - then you will be left with using a linked server and building queries using EXCEPT.

SELECT * FROM dbs1.dbo.table EXCEPT SELECT * FROM remote.dbs3.dbo.table;
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.12 seconds. Powered By: Snitz Forums 2000