Take the 2-minute tour ×
Database Administrators Stack Exchange is a question and answer site for database professionals who wish to improve their database skills and learn from others in the community. It's 100% free, no registration required.

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.

share|improve this question
add comment

2 Answers 2

up vote 4 down vote accepted

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.

share|improve this answer
add comment

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.

share|improve this answer
    
+1 That's a good point. –  Jon Seigel Aug 20 '12 at 16:37
add comment

Your Answer

 
discard

By posting your answer, you agree to the privacy policy and terms of service.

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