none
Unable to Alter the tables or procedures because it is being published for replication in VSTS 2017

    Frage

  • Hi

    when i tried to publish the replicated tables or procedures changes from VSTS 2017 below error showing. Could someone please help me. 

    table is replicated and cannot be modified 

    Procedure is replicated cannot be modified 

    Actually when i disable the 'Do not Alter replicated objects'  option i could publish successfully. is this correct way of doing the changes (or)  am i going in wrong direction.. please help....   


    Mittwoch, 4. Juli 2018 13:20

Antworten

  • Hi

    when i tried to publish the replicated tables or procedures changes from VSTS 2017 below error showing. Could someone please help me. 

    table is replicated and cannot be modified 

    Procedure is replicated cannot be modified 

    Actually when i disable the 'Do not Alter replicated objects'  option i could publish successfully. is this correct way of doing the changes (or)  am i going in wrong direction.. please help....   


    yes thats correct

    If you want to alter objects which are part of replication and publish the changes, you need to turn off this setting

    And by default ALTER TABLE etc type of changes will get automatically replicated to the subscribers unless you explicitly set Replicate schema changes to False in publication properties

    see

    https://docs.microsoft.com/en-us/sql/relational-databases/replication/publish/replicate-schema-changes?view=sql-server-2017


    Please Mark This As Answer if it solved your issue
    Please Vote This As Helpful if it helps to solve your issue
    Visakh
    ----------------------------
    My Wiki User Page
    My MSDN Page
    My Personal Blog
    My Facebook Page


    • Bearbeitet Visakh16MVP Mittwoch, 4. Juli 2018 13:28
    • Als Antwort markiert Raj2018 Mittwoch, 4. Juli 2018 13:54
    Mittwoch, 4. Juli 2018 13:26

Alle Antworten

  • Hi

    when i tried to publish the replicated tables or procedures changes from VSTS 2017 below error showing. Could someone please help me. 

    table is replicated and cannot be modified 

    Procedure is replicated cannot be modified 

    Actually when i disable the 'Do not Alter replicated objects'  option i could publish successfully. is this correct way of doing the changes (or)  am i going in wrong direction.. please help....   


    yes thats correct

    If you want to alter objects which are part of replication and publish the changes, you need to turn off this setting

    And by default ALTER TABLE etc type of changes will get automatically replicated to the subscribers unless you explicitly set Replicate schema changes to False in publication properties

    see

    https://docs.microsoft.com/en-us/sql/relational-databases/replication/publish/replicate-schema-changes?view=sql-server-2017


    Please Mark This As Answer if it solved your issue
    Please Vote This As Helpful if it helps to solve your issue
    Visakh
    ----------------------------
    My Wiki User Page
    My MSDN Page
    My Personal Blog
    My Facebook Page


    • Bearbeitet Visakh16MVP Mittwoch, 4. Juli 2018 13:28
    • Als Antwort markiert Raj2018 Mittwoch, 4. Juli 2018 13:54
    Mittwoch, 4. Juli 2018 13:26
  • Thanks Visakh  
    Mittwoch, 4. Juli 2018 13:56
  • It sounds like what is happening here is that you are using VSTS to modify tables. Replication will protect tables from being modified in certain cases. For example you will not be able to drop a table which is replicated, not will you be able to modify the PK of this table.

    If you do enable the change you are speaking about some changes will be allowed, but not all of them.

    The correct way of doing this is to remove the objects from replication and then add them back in after the schema changes are done.

    This will force reinitialization.

    Donnerstag, 5. Juli 2018 13:59
    Moderator