Monday, February 20, 2012

Replicating Lookup Data

Hello, I have a couple of tables containing lookup data I need to replicate
into a database on a different server.
Originally I was just copying the data acros via DTS but now the target
tables are referenced by a foreign keys on a table this no longer works as I
cannot clear the tables out before loading.
I'm contemplating using DTS to load the lookup's in to tempdb on the target
server then use a stored proc to either insert or update a row in the lookups
depending n if they exist or not. Can I simplify this solution using a method
of replication. The data only need's to be update nightly!
Thanks
Adam
I'd use transactional replication which'll jusst take noghtly changes. The
FKs aren't really needed on the subscriber as the data is lookup only and
the FKs must have been checked on the publisher. Even so, FK not for
replication would perhaps be ideal (this is the default now).
Cheers,
Paul Ibison SQL Server MVP, www.replicationanswers.com
|||Sorry, I didn't make it clear. The table I'm replicating is a list of
locations which need's to be used in another different database. The main
data table in the target database has the foreign key which links to the
location table. There is no foreign key on the source table! If I use
transactional replication, can I ignore deletes?
Thanks
Adam
"Paul Ibison" wrote:

> I'd use transactional replication which'll jusst take noghtly changes. The
> FKs aren't really needed on the subscriber as the data is lookup only and
> the FKs must have been checked on the publisher. Even so, FK not for
> replication would perhaps be ideal (this is the default now).
> Cheers,
> Paul Ibison SQL Server MVP, www.replicationanswers.com
>
>
|||Yes - you can enter NONE for the replicayed command in the article
properties (@.del_cmd).
Cheers,
Paul Ibison SQL Server MVP, www.replicationanswers.com

No comments:

Post a Comment