Daniel Powell
Daniel Powell

Reputation: 8293

.net database schema comparison api

I need the capability to compare two database schemas and verify that they are the same (more or less the same, with a few exceptions).

I know there is the schema comparison tool in VS 2010 but I need something I can use at runtime, I don't think there is an api to use the vs tools at runtime, there does seem to be one but it seems more geared towards configuring the tools at development time.

Is there a way to use these tools at runtime to do a schema comparison or is there a similar tool available (free/opensourced/paid)?

Upvotes: 2

Views: 989

Answers (1)

Mitch Wheat
Mitch Wheat

Reputation: 300509

RedGate's Schema Compare tool, SQL Compare Pro (but not standard edition), has a command line interface for automation.

Update: (added API link)

In response to your comment to the original question: Another approach is to have a schema/application version number table, that the application checks on startup. Then the whole business of applying updates to schema becomes more of a deployment operation. Each schema update can alter the version number.

Upvotes: 1

Related Questions