all groups > sql server replication > march 2005 >
You're in the

sql server replication

group:

newbie replication question


newbie replication question Ed
3/14/2005 6:03:12 AM
sql server replication:
hi,
Can someone tell me the snapshot replication is actually to copy an
article from a publisher to subscriber? If so, is that the same as using the
DTS to copy data?
If tables in Subscriber have foreign key relationshiop, i am not able to
"delete the existing table and recreate it", does that mean tables in
Subscriber cannot have any relationship???

If Merge and Transactional replication are able to update data on both side,
can someone breifly tell the real different between those two?

Thanks so much for answering my question.

Re: newbie replication question rmartinez
3/14/2005 12:01:03 PM
You can also manage you constraints using a pre snapshot script, and a post
snapshot script.

also,instead of dropping and recreating items, you can disable fk
constraints and reenable them after snapshot has taken place.
disable
ALTER TABLE Mytable nocheck CONSTRAINT MyForeignKeyConstraint

enable
ALTER TABLE Mytable check CONSTRAINT MyForeignKeyConstraint

Go to Properties of your publication, then select snapshot tab.

http://msdn.microsoft.com/library/default.asp?url=/library/en-us/repwizrd/repwizrd_5ctl.asp


[quoted text, click to view]
Re: newbie replication question Hilary Cotter
3/14/2005 12:45:56 PM
It is very similar to DTS. DTS will blast data to the subscriber, and in
some cases (by default) will use BULK INSERT. Snapshot Replication will
write the data to the file system, and the bcp (ODBCBCP actually) blast data
to the subscriber. So DTS is faster for a single subscriber, but for
multiple subscribers use Snapshot replication.

Handling dependencies is tricky. First off SQL Server will order your
publications according to DRI so if you are lucky and sysdepends is accurate
you will have not problems. If you are not so lucky, you will run into pk fk
violations.

The best way to handle this is to script out your tables, edit the tables to
disable all constraints and then run this script on your subscriber. Send
then snapshot over, making sure in the name conflicts section you select
keep existing table, and with a post snapshot command re-enable your
constraints.

--
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

[quoted text, click to view]

AddThis Social Bookmark Button