8

I am a subscriber to a transactional replication subscription. I have no control over the publisher.

I have read the following article about schema changes to the publication database:

Make Schema Changes on Publication Databases

However, I am trying to change the schema on the subscription end (if possible). I am wondering if transactional replication supports the addition of persistent computed columns to the subscriber tables.

I would much prefer this solution versus adding a new view for every table that requires a computed value.

5

I tested it out, and yes, this works, even under Peer-to-Peer. (My original comment was incorrect as that only applies to physical columns.)

Given that you don't control the publication, I would recommend naming the column(s) you add very carefully so as to not interfere with any future schema changes. Also, if this database backs a 3rd-party ISV application, for example, I would be extremely cautious about making any schema changes to the base tables.

8

You can do this, but keep in mind that your new column will be wiped out if the subscription is ever reinitialized. ie. The DBA at the publisher alters the publication to add a table, corruption, maintenance, etc. and the snapshot needs to be reapplied, any changes you have made to the replicated schema are dropped and recreated from the publication. So any changes you have made will be dropped as well.

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service, privacy policy and cookie policy

Not the answer you're looking for? Browse other questions tagged or ask your own question.