locked
Database Projects with replicated databases RRS feed

  • Question

  • Hello All this is my first post. I've been working with SQL Server 2008 Replication the past few months but at the same time I have discovered the joy of working with Database projects in the DB Edition of VS 2008 Team System. One problem I ran into as soon as I had enabled replication on the database is that if you try to deploy your db project it rejects saying that it cannot deploy because database X is being replicated.  I've removed the "Data loss" check on the DB project with no luck.  The only way I found that I ran replicate is by disabling replication all together or by removing the publication.

    The basic setup here is my local dev box with SQL Server 2008 serving as the publisher and distributor.
    Thursday, October 1, 2009 3:47 PM

Answers

  • Unfortunately you will be unable to drop replicated objects. It appears that this is what team system is attempting to do.

    Your best bet would be to drop replication, deploy your changes and then re-enable it.
    looking for a book on SQL Server replication? http://www.nwsu.com/0974973602.html looking for a book on SQL Server 2008 Administration? http://www.amazon.com/Microsoft-Server-2008-Management-Administration/dp/067233044X looking for a book on SQL Server 2008 Full-Text Search? http://www.amazon.com/Pro-Full-Text-Search-Server-2008/dp/1430215941
    Friday, October 2, 2009 12:22 PM
    Answerer

All replies

  • Are u trying to update the exiting Database Project DB or Something else
    Mohd Sufian www.sqlship.wordpress.com Please mark the post as Answered if it helped.
    Thursday, October 1, 2009 4:38 PM
  • You need to set the VerifyDeployment option for the deployment of the database project to false to not get this error when deploying to a replicated database. 

    In the properties fiolder of the project, there is a file called database.sqldeployment. Open this in visual studio, and in the advanced options box, at the bottom is an option called VerifyDeployment. By default this is checked. Uncheck it and you will not get these errors when deploying to a replicated database. However turning this off also turns off other checking like checking for external objects if you are referencing other database projects. 


    Anthony

    • Proposed as answer by antxxxx Friday, October 2, 2009 9:56 AM
    Friday, October 2, 2009 9:20 AM
  • Unfortunately you will be unable to drop replicated objects. It appears that this is what team system is attempting to do.

    Your best bet would be to drop replication, deploy your changes and then re-enable it.
    looking for a book on SQL Server replication? http://www.nwsu.com/0974973602.html looking for a book on SQL Server 2008 Administration? http://www.amazon.com/Microsoft-Server-2008-Management-Administration/dp/067233044X looking for a book on SQL Server 2008 Full-Text Search? http://www.amazon.com/Pro-Full-Text-Search-Server-2008/dp/1430215941
    Friday, October 2, 2009 12:22 PM
    Answerer