views:

173

answers:

1

We use VSTS 2008 with SP1 and GDR R2 installed.

Found the next problem:

  1. 2 identical databases (for example Database1 and Database2);
  2. Database1 is a working database, Database2 is a production one;
  3. adding a new stored procedure to the Database1 with comments (description, author etc. before the CREATE PROCEDURE statement);
  4. 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?

+2  A: 

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.

Sub-Star
Thank you! I read a lot of related stuff but didn't find this article.
Alex