"serge" <se****@nospam.ehmail.com> wrote in message
news:At*********************@wagner.videotron.net. ..
Is there a stored procedure to allow me to compare two
SQL objects? In my case for example I want to compare
two stored procedures on two different databases?
If there is no SP that does comparison, would there be
any code in SQL DMO that does this?
How does someone learn SQL DMO? Does SQL Server
2000 have by default DMO learning material or I have to
search for books?
Thank you
As John suggested, you can use the DMO Script method and compare the output.
This should be fine for procs, but it can be a problem for tables, because
you may have constraints which have been assigned a name by the system - the
constraint definition is identical, but it will show up as a difference in
your diff. You may or may not regard this as a problem, but tools such as
the Red Gate one allow you to configure your comparison to take this into
account, as well as whether or not to compare indexes, if a comparison
should be case-sensitive etc.
As for learning SQL-DMO - Books Online and practice. If you're already
familiar with COM programming, that would be useful, but it's far from
essential. Unfortunately the Books Online documentation doesn't provide many
examples - it tends to describe the steps to follow for a certain task, but
doesn't also give an actual code sample. Even if you want to use SQL-DMO
from a compiled language like VB or C#, I suggest you consider also using a
language such as Perl or Python - it's usually much faster for quick tests
and ad hoc experiments.
Simon