all groups > sql server replication > february 2004 >
You're in the

sql server replication

group:

subscription lost.


subscription lost. Samir R. Ibrahim
2/29/2004 8:47:08 PM
sql server replication:
How can i re-create an alread push subscribtion that was deleted but before
that i want to get the data from the subscription server before the main
server send his data?

Samir R. Ibrahim

Re: subscription lost. Samir R. Ibrahim
2/29/2004 10:47:08 PM
Is my question is stupid or no one knows the answer? is it hard for some one
to answer NO IT CANNOT BE HAPPEND ?


[quoted text, click to view]

Re: subscription lost. Samir R. Ibrahim
3/1/2004 12:15:32 AM
Thank you very much Raj for answering and this soultion.

Actually i already was doing the push subscribtion with no schema. But my
solution was is to export the recored from each table on the subscribor to a
new table and then import these table from the publisher. but your solution
is more efficent and quick. indeed Nice Trick.

But i have a qyestion to you, what if i didnot specify any condition in the
WHERE ? that will take all the data fro the subscribor, is there is wrong in
that?


[quoted text, click to view]

Re: subscription lost. Raj Moloye
3/1/2004 12:52:05 AM
Hello Samir,

If you haven't got anything better, try this, if you are using merge
replication.
Create a push subscription normally, except where you are asked to
initialise the data at the Subscriber, select No. This way when you
synchronise, the data at the subscriber will not be lost. This also depends
on how your snapshot has been configured to happen (drop table, keep data
etc...)

Normally, the data from the subscriber should synchronise to the publisher.
If not, depending on your data organisation, you can induce updates into the
tables using statements like:
UPDATE <table_name>
SET <column_name1> = <column_name1> (use any one column from your
table)
WHERE <some condition>

The WHERE clause should be well thought out so that only data belonging to
the subscriber are updated.
Note: in the statement above we are updating values to themselves, so we are
not actually changing anything to the underlying data. However, replication
will capture them as changes to be updated to the publisher (nice trick!!)

Hope this helps.
Raj


[quoted text, click to view]

Re: subscription lost. Raj Moloye
3/3/2004 6:20:07 PM
Hello Samir,
Glad that this solution is working for you!

Concerning the WHERE clause, whether to use it or not will depend on how
your data is organised. If your subscriber receives partial dataset (through
filtering) then there would not normally be a case to use this clause.
However, if your subscriber is receiving data that is also modified
elsewhere (e.g. at the publisher or some other subscriber) then you would
not want changes made to this subscriber to overwrite any changes made
elsewhere (if changes are made between two syncs then you would get a lot of
conflicts). If the above are not concerns then no need to use the where
clause.

Regards,
Raj


[quoted text, click to view]

AddThis Social Bookmark Button