Alexis Abril
Alexis Abril

Reputation: 6459

SQL Server Replication by column mapping

Is it possible to use SQL Server's replication service to replicate from table A on a given server to a different schema on table B?

ie,

Table A
----------
ID int
Name varchar(20)
Data text

Table B
----------
ID int
Name varchar(20)
Description varchar(10)

Replication would copy "Name" from table A to table B for a given ID.

It is possible to choose specific columns within a table as article data, however, I'm not sure if it is possible to then map that data on the subscription side.

Upvotes: 0

Views: 924

Answers (2)

Alexis Abril
Alexis Abril

Reputation: 6459

Replication services were something I was interested in for this issue, however, in getting lost in a nice tool, I overlooked a simpler solution.

For reference, the solution we ended up going with was scheduling a stored procedure as a job, which continually updates a given data set.

Upvotes: 1

Remus Rusanu
Remus Rusanu

Reputation: 294407

Which type of replication? Merge, snapshot, transactional?

For instance you can make the subscription to initalize manually and use stored procedure for insert/update/delete, and then you can modify these procedures as you see fit to adapt to the target subscriber's schema. While possible, I wouldn't call these modifications and deployment procedures trivial. Better get help from an expert to set it up.

Upvotes: 0

Related Questions