November 4, 2011 at 9:50 am
I am having a problem adding a column to a table that is replicated using transactional replication.
There are custom insert and update stored procedures for the table, and these are dropped and created on the subscriber (via the .pre and .sch scripts) before the column is added. This leads to an error creating the insert procedure because the new column referenced in the stored procedure does not exist at this time.
Is there any way to influence the order of execution to overcome this issue?
thanks
Stephen
November 4, 2011 at 1:02 pm
Stephen Keating (11/4/2011)
I am having a problem adding a column to a table that is replicated using transactional replication.There are custom insert and update stored procedures for the table, and these are dropped and created on the subscriber (via the .pre and .sch scripts) before the column is added. This leads to an error creating the insert procedure because the new column referenced in the stored procedure does not exist at this time.
Is there any way to influence the order of execution to overcome this issue?
thanks
Stephen
Unfortunatley not. You have to check where the table is replicated to and script the custom replication scripts yourself.
November 8, 2011 at 3:21 am
Got around the issue by creating the insert and update stored procedures as dynamic sql. This allows the stored procedures to be created no matter what order Sql Server replicates the schema changes.
Viewing 3 posts - 1 through 2 (of 2 total)
You must be logged in to reply to this topic. Login to reply