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

 All Forums
 SQL Server 2005 Forums
 Transact-SQL (2005)
 Compaire databases structure tables and views

Author  Topic 

malikjaved
Starting Member

21 Posts

Posted - 2008-02-07 : 12:42:05
Hi,
i have two different databases, i want to compaire the tables of these databases if any thing has on database 1 with respet to database 2 changed or any colume is added into one database. is there any way, or procedure or script to do this thing

thanks and looking forward.
-MALIK

tkizer
Almighty SQL Goddess

38200 Posts

Posted - 2008-02-07 : 12:43:52
I use SQL Compare by Red Gate to do the comparison. It isn't free, but it is worth the small price.

Not sure if anyone has posted a free T-SQL script to do the comparison.

Tara Kizer
Microsoft MVP for Windows Server System - SQL Server
http://weblogs.sqlteam.com/tarad/
Go to Top of Page

jhocutt
Constraint Violating Yak Guru

385 Posts

Posted - 2008-02-07 : 13:02:14
use enterprise manager to script out both databases then use diff
http://www.gnu.org/software/diffutils/diffutils.html


"God does not play dice" -- Albert Einstein
"Not only does God play dice, but he sometimes throws them where they cannot be seen."
-- Stephen Hawking
Go to Top of Page

rmiao
Master Smack Fu Yak Hacker

7266 Posts

Posted - 2008-02-07 : 20:13:19
Sql2k5 comes with tablediff.exe.
Go to Top of Page
   

- Advertisement -