locked
SQL Server Replication + can't publish. RRS feed

  • Question

  • Hi,

    I have a database that get schema change by lightswitch with the generated script.

    Now we want to replicate that database so configured the database for replication.

    But when I change some fields in a table and try to publish I get this:

     

    Error 1 An exception occurred when building the database for the application.
    Verification of the deployment plan failed.
    Warning SQL72015: The column [dbo].[AgeGroups].[rowguid] is being dropped, data loss could occur.
    Warning SQL72015: The column [dbo].[Articles].[rowguid] is being dropped, data loss could occur.

    ..

    Error SQL72031: This deployment may encounter errors during execution because changes to [dbo].[AgeGroups] are blocked by [dbo].[MSmerge_upd_E04A8834F22247D1A6BC73CE377F01EC]'s dependency in the target database.
    Error SQL72031: This deployment may encounter errors during execution because changes to [dbo].[AgeGroups] are blocked by [dbo].[MSmerge_del_E04A8834F22247D1A6BC73CE377F01EC]'s dependency in the target database.

    ...

    Warning SQL72030: If this deployment is executed, changes to [dbo].[AgeGroups] might introduce run-time errors in [dbo].[ETL_Resynch_01m_AgeGroups].
    Warning SQL72030: If this deployment is executed, changes to [dbo].[AgeGroups] might introduce run-time errors in [dbo].[uspInsertPurchaseOrderGeneratedLines].

    ...

    Error SQL72035: [dbo].[AgeGroups] is replicated and cannot be modified.
    Error SQL72035: [dbo].[Articles] is replicated and cannot be modified.

    How can I skip all these warnings? Do I have to add rowguid in every table in LightSwitch?

    Any idea how I can turn off: VerifyDeployment?

    we want to use this setup in a live environment very soon!

    Thanks for any help of tip!

    Tuesday, June 17, 2014 8:40 AM

Answers

  • LightSwitch will not make schema changes when publishing if data loss could occur because of those changes. EG removing a column, making a varchar column shorter or reducing the precision of a number column.

    To make these changes, either perform them manually using SQL Server Management Studio or use Visual Studio Professional (or above) to perform a Schema Compare and select the option to ignore the possibility of data loss.


    Simon Jones
    If you found this post helpful, please "Vote as Helpful". If it actually answered your question, please remember to "Mark as Answer". This will help other people find answers to their problems more quickly.


    Friday, June 20, 2014 2:51 PM

All replies

  • Anyone from Microsoft? Please!
    Wednesday, June 18, 2014 6:52 PM
  • Error 1 An exception occurred when building the database for the application.
    Verification of the deployment plan failed.

    Error SQL72031: This deployment may encounter errors during execution because changes to [dbo

    According to the error message,  you need find the tables in the database which these changes affect and either remove them and publish again.

    Hope it helps.

    Regards


    We are trying to better understand customer views on social support experience, so your participation in this interview project would be greatly appreciated if you have time. Thanks for helping make community forums a great place.
    Click HERE to participate the survey.

    Friday, June 20, 2014 6:59 AM
  • That is not an option because I can't lose my data in those tables...
    Friday, June 20, 2014 1:18 PM
  • LightSwitch will not make schema changes when publishing if data loss could occur because of those changes. EG removing a column, making a varchar column shorter or reducing the precision of a number column.

    To make these changes, either perform them manually using SQL Server Management Studio or use Visual Studio Professional (or above) to perform a Schema Compare and select the option to ignore the possibility of data loss.


    Simon Jones
    If you found this post helpful, please "Vote as Helpful". If it actually answered your question, please remember to "Mark as Answer". This will help other people find answers to their problems more quickly.


    Friday, June 20, 2014 2:51 PM