Sql-server – SQL Server : Transactional Replication Computed Column

sql servertransactional-replication

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.

Best Answer

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.