I am currently using SMO and C # to navigate databases to create a settings tree representing the various aspects of the two databases, and then compare these trees to see where and how they differ.
The problem is that for 2 databases with a reasonable size, it takes almost 10 minutes to go around them locally and collect the table / column / stored procedure information that I want to compare.
Is there a more convenient interface than SMO for accessing databases in this way? I would not want to include any additional dependencies, but I will take this pain to improve speed by 50%. The following is an example of how I list tables and columns.
Microsoft.SqlServer.Management.Smo.Database db = db_in;
foreach (Table t in db.Tables)
{
if (t.IsSystemObject == false)
{
foreach (Column c in t.Columns)
{
}
}
}