开发者

.net database schema comparison api

I need the capability to compare two database schemas and verify that开发者_如何学C 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)?


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

  • Powershell to Automate SQL Compare

Update: (added API link)

  • Getting Started with the SQL Compare API

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.

0

上一篇:

下一篇:

精彩评论

暂无评论...
验证码 换一张
取 消

最新问答

问答排行榜