VSTS database schema comparison not saving comments
-
10-07-2019 - |
Question
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 the
CREATE PROCEDURE
statement); - trying to compare schemes on
Database1 (source) and Database2
(target); the new SP successfully
added to the Database2 but without comment above the
CREATE 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?
Solution
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.
Licensed under: CC-BY-SA with attribution
Not affiliated with StackOverflow