VSTS数据库架构比较不保存注释
我们使用安装了 SP1 和 GDR R2 的 VSTS 2008。
发现下一个问题:
- 2个相同的数据库(例如 数据库1和数据库2);
- Database1 是一个工作数据库, Database2 是生产数据库;
- 添加一个新的存储过程 带有注释的数据库1 (
CREATE PROCEDURE
语句之前的描述、作者等); - 尝试比较方案 数据库1(源)和数据库2 (目标); 新SP成功 添加到 Database2,但在
CREATE PROCEDURE
语句上方没有注释(但 SP 主体中的注释被完全保留)。
Database1中的存储过程部分:
-- ============================================= -- Author: [author here] -- Create date: [creation date here] -- Description: [description here] -- ============================================= CREATE PROCEDURE [schema here].[procedure name here] @param1 uniqueidentifier, @param2 nvarchar(64), @param3 bit, @param4 int = 1, @param5 int = 25, @param6 int = 0 output, @param7 int = 0 output AS
数据库2中模式比较后的结果:
CREATE PROCEDURE [schema here].[procedure name here] @param1 UNIQUEIDENTIFIER, @param2 NVARCHAR (64), @param3 BIT, @param4 INT=1, @param5 INT=25, @param6 INT=0 OUTPUT, @param7 INT=0 OUTPUT AS
它谋杀了注释。 模式比较选项中的复选标记... -> 忽略评论 未选中。
有什么办法可以让这个工作吗?
We use VSTS 2008 with SP1 and GDR R2 installed.
Found the next problem:
- 2 identical databases (for example
Database1 and Database2); - Database1 is a working database,
Database2 is a production one; - adding a new stored procedure to the
Database1 with comments
(description, author etc. before theCREATE PROCEDURE
statement); - trying to compare schemes on
Database1 (source) and Database2
(target); the new SP successfully
added to the Database2 but without comment above theCREATE PROCEDURE
statement (but comments in the SP body are fully preserved).
The part of the stored procedure in Database1:
-- ============================================= -- Author: [author here] -- Create date: [creation date here] -- Description: [description here] -- ============================================= CREATE PROCEDURE [schema here].[procedure name here] @param1 uniqueidentifier, @param2 nvarchar(64), @param3 bit, @param4 int = 1, @param5 int = 25, @param6 int = 0 output, @param7 int = 0 output AS
The result in Database2 after schema comparison:
CREATE PROCEDURE [schema here].[procedure name here] @param1 UNIQUEIDENTIFIER, @param2 NVARCHAR (64), @param3 BIT, @param4 INT=1, @param5 INT=25, @param6 INT=0 OUTPUT, @param7 INT=0 OUTPUT AS
It murdered comments.
The check mark in the Schema compare options... -> Ignore Comments
is unchecked.
Is there any way to make this work?
如果你对这篇内容有疑问,欢迎到本站社区发帖提问 参与讨论,获取更多帮助,或者扫码二维码加入 Web 技术交流群。
绑定邮箱获取回复消息
由于您还没有绑定你的真实邮箱,如果其他用户或者作者回复了您的评论,将不能在第一时间通知您!
发布评论
评论(1)
我记得不久前读过一些关于此的内容,经过一番挖掘后我发现 这篇由 Gert Drapers(又名 The Datadude)撰写的博客文章,描述了您的确切问题。 他说这是一个已知问题,团队正在努力解决。 这篇文章可以追溯到 GDR2 发布之前,所以我猜他们还没有修复它,因为你仍然遇到这个问题。
I remembered having read something about this a while ago, and after a little digging I found this blog post by Gert Drapers, a.k.a. The Datadude, which describes your exact problem. He says that it is a known problem and that the team is working on a fix. The post dates back to before the GDR2 was released, so I guess they haven't fixed it yet since you still have this problem.