VS2010数据库比较。如何创建 *.DBSchema 扩展文件?

发布于 2024-08-31 04:39:30 字数 164 浏览 2 评论 0原文

我想拍摄数据库快照,进行一些更改,然后使用数据库比较功能来识别更改,谁知道呢,甚至可能生成脚本来进行更改。

我想避免必须备份当前数据库并将其恢复为单独的数据库只是为了获得“之前”快照。我想我不应该这样做。

显然,我对数据库项目一无所知,并且希望得到正确的方向。

蒂!

I'd like to take a snapshot of my database, make some changes and then use the db compare functionality to identify the changes, and who knows, maybe even generate scripts to make the change.

I'd like to avoid having to backup the current db and restore it as a separate db just to have a "before" snapshot. I'm guessing I shouldn't have to.

Obsviously, I'm clueless about db projects and am looking to be pointed in the right direction.

ty!

如果你对这篇内容有疑问,欢迎到本站社区发帖提问 参与讨论,获取更多帮助,或者扫码二维码加入 Web 技术交流群。

扫码二维码加入Web技术交流群

发布评论

需要 登录 才能够评论, 你可以免费 注册 一个本站的账号。

评论(2

画离情绘悲伤 2024-09-07 04:39:30

在将生成架构文件的计算机上,执行以下操作:
下载 Microsoft SQL Server Compact 3.5 Windows 桌面 Service Pack 2。首先安装 32 位版本,然后安装 64 位版本(如果您的服务器是 64 位)

复制将 (Program Files\Microsoft Visual Studio 10.0\VSTSDB\Deploy) 中的文件复制到将运行 VSDBCMD.EXE 的计算机上,忽略步骤 2 中的 CE 文件,您已在 Compact SQL 安装中安装了这些文件多于。

阅读并理解 VSDBCMD.EXE 命令行参考 http://msdn.microsoft .com/en-us/library/dd193283.aspx

通过从命令提示符运行以下命令来生成 dbschema 文件: VSDBCMD /a:import /cs:"DbConnectionString" /dsp:SQL /ModelFile: outputfilname.dbschema

On the machine which you will generate the schemafile, do the following:
Download Microsoft SQL Server Compact 3.5 Service Pack 2 for Windows Desktop. Install 32 bit version first, then 64 bit (if your server is 64 bit)

Copy the files in (Program Files\Microsoft Visual Studio 10.0\VSTSDB\Deploy) to the machine on which you will run VSDBCMD.EXE, ignore the CE files in step 2, you have already installed these in the Compact SQL install above.

Read and understand Command-Line Reference for VSDBCMD.EXE http://msdn.microsoft.com/en-us/library/dd193283.aspx

Generate the dbschema file by running this from the command prompt: VSDBCMD /a:import /cs:"DbConnectionString" /dsp:SQL /ModelFile: outputfilname.dbschema

迷离° 2024-09-07 04:39:30

我使用的是 VS2010 Premium,并且能够执行以下操作:

  1. 在服务器资源管理器中,添加到数据库 A 和数据库 B 的数据连接
  2. 右键单击​​数据库 A 并选择比较架构
  3. 选择数据库 B 作为目标,设置选项/变量,然后单击“确定”

我还安装了 SQL Server Developer Edition...所以也许这就是添加此功能的原因。

不知道为什么,但这不适用于 SQL Azure 数据库。

I'm using VS2010 Premium and I was able to do the following:

  1. In Server Explorer, add a Data Connection to database A and database B
  2. Right click on database A and choose Compare Schema
  3. Pick database B as the Target, set the options/variables, then click OK

I also have SQL Server Developer Edition installed...so maybe that is what adds this functionality.

Not sure why, but this didn't work for a SQL Azure database.

~没有更多了~
我们使用 Cookies 和其他技术来定制您的体验包括您的登录状态等。通过阅读我们的 隐私政策 了解更多相关信息。 单击 接受 或继续使用网站,即表示您同意使用 Cookies 和您的相关数据。
原文