locked
VS2012: Schema compare, update button disabled RRS feed

  • Question

  • When using the schema compare function of Visual Studio 2012, I can successfully compare and update from database (SQL Server 2012) to my database project. However, I cannot do it the other way around; from db-project to database. The update button is simply disabled. 

    - The db project does compile and deploy.

    - No error messages in the output window.

    Any ideas? 

    Microsoft Visual Studio Premium 2012
    Version 11.0.51106.01 Update 1
    Microsoft .NET Framework
    Version 4.5.50709

    Installed Version: Premium

    LightSwitch for Visual Studio 2012   04941-004-0043007-02399
    Microsoft LightSwitch for Visual Studio 2012

    Microsoft Visual Studio Tools for Applications 2012   04941-004-0043007-02399
    Microsoft Visual Studio Tools for Applications 2012

    Office Developer Tools   04941-004-0043007-02399
    Microsoft Office Developer Tools

    Team Explorer for Visual Studio 2012   04941-004-0043007-02399
    Microsoft Team Explorer for Visual Studio 2012

    Visual Basic 2012   04941-004-0043007-02399
    Microsoft Visual Basic 2012

    Visual C# 2012   04941-004-0043007-02399
    Microsoft Visual C# 2012

    Visual C++ 2012   04941-004-0043007-02399
    Microsoft Visual C++ 2012

    Visual F# 2012   04941-004-0043007-02399
    Microsoft Visual F# 2012

    Visual Studio 2012 Code Analysis Spell Checker   04941-004-0043007-02399
    Microsoft® Visual Studio® 2012 Code Analysis Spell Checker

    Portions of International CorrectSpell™ spelling correction system © 1993 by Lernout & Hauspie Speech Products N.V. All rights reserved.

    The American Heritage® Dictionary of the English Language, Third Edition Copyright © 1992 Houghton Mifflin Company. Electronic version licensed from Lernout & Hauspie Speech Products N.V. All rights reserved.

    Visual Studio 2012 SharePoint Developer Tools   04941-004-0043007-02399
    Microsoft Visual Studio 2012 SharePoint Developer Tools

    Color Theme Designer   1.0
    Designer for creating new color themes

    NuGet Package Manager   2.0.30625.9003
    NuGet Package Manager in Visual Studio. For more information about NuGet, visit http://docs.nuget.org/.

    PreEmptive Analytics Visualizer   1.0
    Microsoft Visual Studio extension to visualize aggregated summaries from the PreEmptive Analytics product.

    SQL Server Analysis Services   
    Microsoft SQL Server Analysis Services Designer 
    Version 11.0.3369.0

    SQL Server Data Tools   11.1.30618.1
    Microsoft SQL Server Data Tools

    SQL Server Integration Services   
    Microsoft SQL Server Integration Services Designer
    Version 11.0.3369.0

    SQL Server Reporting Services   
    Microsoft SQL Server Reporting Services Designers 
    Version 11.0.3369.0

    Web Developer Tools   1.0.30710.0
    Microsoft Web Developer Tools contains the following components:
    Page Inspector: Tool that offers an efficient way to decompose Web Applications and diagnose front-end issues.
    Web Publishing: Extensions required for Web Publishing for both hosted servers as well as on premises.
    Web Form Templates: Includes the default templates for Web Form Applications.
    Editor Extensions: Includes HTML, CSS, and JS editor extensions that greatly enhance the development experience.



    Henrik Fyhn http://repeatableread.blogspot.com/

    Tuesday, August 6, 2013 8:26 AM

Answers

All replies

  • Hi Henrik,

    Just to make this issue clearly, do you mean that you want to update the target database? If so, you would make sure that you updated the target script, and then you click update.

    Reference:

    How to Compare Database Schema in VS 2012, How to Update the Target Database to the Server.

    Have a nice day,


    Jack Zhai [MSFT]
    MSDN Community Support | Feedback to us
    Develop and promote your apps in Windows Store
    Please remember to mark the replies as answers if they help and unmark them if they provide no help.

    Thursday, August 8, 2013 7:12 AM
    Moderator
  • That's right, I want to update the target. The link you sent me is the expected behavior, but the update and show script button is simply greyed out.

    Am I missing something?


    Henrik Fyhn http://repeatableread.blogspot.com/

    Thursday, August 8, 2013 6:01 PM
  • Hi Henrik,

    I can successfully compare and update from database (SQL Server 2012) to my database project. However, I cannot do it the other way around; from db-project to database.

    Based on the above information, you would check whether it is related to this reason:

    If a project is specified as the target for comparison, the maximum supported path length (excluding drive letter, colon and leading backslash) for the project is 256 characters. If your project path exceeds 256 characters, you will still be able to compare its schema with a database or another project. However, you will not be able to update its schema.

    Reference:

    http://msdn.microsoft.com/en-us/library/hh272690(v=vs.103).aspx

    Best Regards,


    Jack Zhai [MSFT]
    MSDN Community Support | Feedback to us
    Develop and promote your apps in Windows Store
    Please remember to mark the replies as answers if they help and unmark them if they provide no help.

    Monday, August 12, 2013 7:24 AM
    Moderator
  • Double checked. The length is < 60 characters

    BTW, my collague is seeing the same behavior.

    Something is not right here. This should be pretty easy. I've used this feature ever since VS2008 GDE.


    Henrik Fyhn http://repeatableread.blogspot.com/

    Monday, August 12, 2013 9:00 AM
  • If you click “Compare”, what result did you get in “Results” windows like the following screen shot(or any message)?

    Best Regards,


    Jack Zhai [MSFT]
    MSDN Community Support | Feedback to us
    Develop and promote your apps in Windows Store
    Please remember to mark the replies as answers if they help and unmark them if they provide no help.

    Monday, August 12, 2013 9:14 AM
    Moderator
  • Lot's of differences...


    Henrik Fyhn http://repeatableread.blogspot.com/

    Monday, August 12, 2013 10:35 AM
  • Hi Henrik,

    You could submit this feedback to Microsoft Connect feedback portal: http://connect.microsoft.com, Microsoft engineers will evaluate them seriously. Please share me the link if you submit the connect report. My Environment met an issue, I will try to create a new Environment and repro this issue, if I get the same issue, I will help you vote it. Thanks for your understanding.

    Best Regards,


    Jack Zhai [MSFT]
    MSDN Community Support | Feedback to us
    Develop and promote your apps in Windows Store
    Please remember to mark the replies as answers if they help and unmark them if they provide no help.

    Tuesday, August 13, 2013 2:14 AM
    Moderator
  • Just installed Visual Studio 2012 with SP3 at a new job. And I am experiencing the same problem.

    Compare functionality works and returns a list of changes. Both the Update button and Generate Script button are disabled.

    Tuesday, August 13, 2013 7:52 PM
  • Tuesday, August 13, 2013 8:28 PM
  • I reviewed the bug description in the link provided above. However, I do not think it applies in my situation.

    The following are the steps I take to reproduce the problem.

    1. Start Visual Studio Professional 2012 (Version 11.0.60610.01 Update 3).

    2. Select the SQL | Schema Compare  | New Schema Comparison menu item. (Note: this is why I think the link does not apply as there is no project file).

    3. Select source, and target (different servers both are SQL Server 2008 R2).

    4. Perform the Compare.

    5. I get results back (updates, deletes, add - tables, procs, etc). On a side note, there were some errors reported. Two were "data loss could occur" because of a column drop, and three were "cannot be deployed as the script body is encrypted".

    6. Update and Generate script buttons are still disabled.

    Wednesday, August 14, 2013 5:31 PM