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
 compare two database tables
 New Topic  Reply to Topic
 Printer Friendly
Author Previous Topic Topic Next Topic  

cutepraba
Yak Posting Veteran

India
53 Posts

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

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.

config:
sql2000
windows2003
both can be connected in LAN

____________
Praba

jeffw8713
Aged Yak Warrior

USA
806 Posts

Posted - 12/30/2012 :  10:34:28  Show Profile  Reply with Quote
Take a look at Redgate's SQL Data Compare utility...it 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  
 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.08 seconds. Powered By: Snitz Forums 2000