July 3, 2003 at 1:43 pm
I'm learning replication (snapshot for now) and was trying filtering & got strange results. (SQL 2K sp2)
Publisher: Table1
FieldA
FieldB
FieldC
Subscriber: Table1
FieldA
FieldB
FieldC
But now, I decide after the fact to filter FieldC. The subscriber Table still has 3 fields, but the publisher data from Field 1 + 2 gets shifted across all 3 fields at the subscriber.
If I manually drop the table at the subscriber, then next time the job runs, it recreates the table with just 2 fields and looks good.
Is there some way to set replication so that it will drop & re-create the subscriber table automatically if the filter changes ? Or am I missing something else in my understanding ?
Under "Default Table Article Properties - Snapshot" the option "DROP the existing table & recreate it" is checked. When does that apply ?? Just when first set up ?
Any enlightenment is appreciated.
July 7, 2003 at 9:06 am
If you are only filtering the columns in the publication, then you shouldn't have any problems. You must be doing something wrong if the fileds gtes shifted.
Everytime you made changes to the publication, you better drop and re create the publication, to avoid problems.
"DROP the existing table & recreate it" will apply each time the snapshot agent is run. Like this is a snapshot publication, then it will run everytime you try to replicate.
To understand what is the snapshot that applies to the subscriber, you can open and also edit, the files that SQL created in the snapshot folder.
July 7, 2003 at 9:44 am
Sometimes drop/create makes sense, sometimes not. It's the easiest way to go. For example, suppose after your initial snapshot you modify the subscriber table, maybe add a column and a trigger. If you drop/recreate, you have to put that stuff back each time you snapshot. Dont know that any one way is right or wrong, just use what fits your needs.
Andy
Viewing 3 posts - 1 through 3 (of 3 total)
You must be logged in to reply to this topic. Login to reply