dbTalk Databases Forums  

Re: FK for tables out of the publication.

microsoft.public.sqlserver.replication microsoft.public.sqlserver.replication


Discuss Re: FK for tables out of the publication. in the microsoft.public.sqlserver.replication forum.



Reply
 
Thread Tools Display Modes
  #1  
Old   
Paul Ibison
 
Posts: n/a

Default Re: FK for tables out of the publication. - 02-01-2006 , 03:04 AM






Eyal,
you can use pre-snapshot and post-snapshot scripts to handle FKs outside of
the publication.
Cheers,
Paul Ibison SQL Server MVP, www.replicationanswers.com
(recommended sql server 2000 replication book:
http://www.nwsu.com/0974973602p.html)



Reply With Quote
  #2  
Old   
Hilary Cotter
 
Posts: n/a

Default Re: FK for tables out of the publication. - 02-01-2006 , 03:25 AM






What you need to do is change the article properties to keep the existing
table intact. Right click on your publication, select properties, click on
the articles tab, and then select the snapshot tab, and select keep existing
table unchanged. Note that this might duplicate data, so you may need to use
the delete data option and have cascading deletes on the subscriber.

--
Hilary Cotter
Looking for a SQL Server replication book?
http://www.nwsu.com/0974973602.html

Looking for a FAQ on Indexing Services/SQL FTS
http://www.indexserverfaq.com

"??? ?????" <nospameyalSchapira (AT) hotmail (DOT) com> wrote

Quote:
Hi ,

I would like to know what is the base approach for FK for tables out of
the
publication.
I have several situations that I would like to add FK from tables out
of
publication ( tables that do not replicate at all - historical tables or
replicate by different publication) to a table in live publication.
This
actually can be done, but when I have to initialize the publication and
apply
new snapshot the agent will fail because it does not able to drop the
table
/delete rows due to the FK. I thought that define the FK as "not for
replication" will solve it but it doesn't.

I have the problem on SQL 2000 enterprise edition SP3 and SP4.

Eyal




Reply With Quote
Reply




Thread Tools
Display Modes

Posting Rules
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts

vB code is On
Smilies are On
[IMG] code is On
HTML code is Off



Powered by vBulletin Version 3.5.3
Copyright ©2000 - 2013, Jelsoft Enterprises Ltd.