June 5, 2006 at 2:34 am
Hi,
I like to be able to compare db schema. Anyone any ideas on how to automate this process and send notification when changes are made.
Thanks
Bob
BJ
June 5, 2006 at 10:44 am
If you're talking about comparing schema between two databases, there are a bunch of 3rd party comparison tools available. We just purchased ApexSQL's Diff tool for comparing database objects and it's easy to use and accurate. You could also check the script section on this site in case someone has a homegrown solution.
If you mean you want to know when a structural change has been made to a database object, I think you'd have to audit for CREATE, ALTER, and DROP statements. You can use Profiler or a 3rd party tool.
Greg
Greg
June 6, 2006 at 2:15 am
download toad for sql, trial version for 30 days builtin schema comparison tool...gr8t
June 6, 2006 at 6:45 am
there are also a few contributions in the scripts section that do a decent job for the price(free).
search for "Compare" in the "Scripts" section;
Lowell
June 6, 2006 at 7:46 am
Make a cursos for all the tables in sysobjects
use this query to compare
SELECT *
from database1..Information_Schema.COLUMNS
where Table_Name=@tableName AND
Column_Name
not in (select Column_Name
from database2..Information_Schema.COLUMNS
where Table_Name=@tableName)
Viewing 5 posts - 1 through 4 (of 4 total)
You must be logged in to reply to this topic. Login to reply