SQL Server Performance

Urgent Repl. Question - need to apply script in production

Discussion in 'SQL Server 2005 Replication' started by sql_jr, Aug 24, 2007.

  1. sql_jr New Member

    hi,
    We have a merge replication in 2005 setup and running fine. When we set it up, we published all the tables, and there were some user-defined triggers on these - so they exist at both the publisher and subscriber. Now, we have a request to apply changes, and wondering the best way to proceed.
    The script needs to be applied to both publisher AND subscriber. The script drops the trigger, makes some table modifications, and update, and then recreates the trigger. HOW should I apply this to both ends? Do I just run the script on both sides with no issues? Do I need to add NOT FOR REPLICATION? PLEASE HELP!!
  2. techbabu303 New Member

  3. sql_jr New Member

    I appreciate this article, and actually it's quite cool, for SQL 2000. And althought it mentions 2005, where "This scenario was corrected in SQL 2005", I'm not sure how this applies specifically to triggers, that's my main concern. I know adding a column (ddl) will actually replicate via 2005 merger automatically, but again, not sure about TRIGGERS. Any other thoughts? THx
  4. sql_jr New Member

    Ok, the very top of this, seems to indicate that ALTER TRIGGERS are included in 2005 ddl/schema replication.
    http://msdn2.microsoft.com/en-us/library/ms151870.aspx
    The question is the way this script is, to drop and recreate the trigger, will this work, or do I have to change it to ALTER.
    It looks as the intention is to 'drop' the trigger' do an update and recreate it. Perhaps I should use the new DISABLE TRIGGER -- do update - ENABLE TRIGGER -- and finally ALTER TRIGGER? Can any of you GURUS confirm this? PLEASE
    UPDATE: I successfully implemented this and the triggers replicated.
    My plan DISABLE TRIGGER on publisher-- do update - ENABLE TRIGGER publisher -- and finally ALTER TRIGGER on publisher --> Propagated to the Subscriber!

Share This Page