Groups | Blog | Home
all groups > sql server replication > december 2006 >

sql server replication : Centralized Subscriber - MSIns and MSUpd stored procedures shared access


Lavanya
12/20/2006 2:34:32 AM
All,

Transactional Pull model: Multiple publishers with the same
articles(2000) : Single Subscriber (2005)

I try to setup replication from the second publisher when the first
publisher's distribution agent is actively pulling data. At this point,
the storeprocedures indicating the insert and update operations for the
articles are dropped and recreated.

This poses a sharing violation problem. Is there any way in Replication
framework that i can protect the SP(s) when it is in use.

Currently, the first publisher goes to 'retrying' state and resumes
after the SP is created by the second subscription.

Help needed asap.

Thanks in advance,
Lavanya
Paul Ibison
12/27/2006 8:14:44 PM
For the second publication, you need to select the option to 'Keep the
existing table unchanged' (see
http://www.replicationanswers.com/CentralSubscriberArticle.asp).
Cheers,
Paul Ibison SQL Server MVP, www.replicationanswers.com .

Lavanya
12/27/2006 11:12:34 PM
I have this option already set so that the central subscriber is having
all the data from all publishers.

The sharing violation is pronounced in the first publisher when its
distribution agent goes into retry state. When the SP is created again
by the second publisher, the first publisher becomes active again in
send data.

Help needed!
Lavanya

[quoted text, click to view]
Lavanya
12/28/2006 5:46:48 AM
Thanks Paul,

Does your suggesstion mean that the subscriber already has the schema
and data and hence the subscriptions will say no in initialize
subscription option?
If it is correct, then again in my case the central subscriber get
initialised with the schema only from the first publisher.

Regards,
Lavanya

[quoted text, click to view]
Lavanya
12/28/2006 5:48:53 AM
Thanks Paul,

Does your suggesstion mean that the subscriber already has the schema
and data and hence the subscriptions will say no in initialize
subscription option?
If it is correct, then again in my case the central subscriber get
initialised with the schema only from the first publisher.

Regards,
Lavanya

[quoted text, click to view]
Paul Ibison
12/28/2006 9:26:27 AM
Lavanya,
I can't test this where I am at the moment, but I'm thinking you could try
doing a nosync initialization to avoid the drop of the procedures.
Cheers,
Paul Ibison SQL Server MVP, www.replicationanswers.com .

Paul Ibison
12/28/2006 3:37:03 PM
Yes - I was thinking that you'd transfer the data some other way and thus
avoid the complete initialization process and dropping of procedures. As an
alternative you could try changing the insert command to SQL and so on for
the update and delete command, in which case the stored procedures won't be
needed.
Cheers,
Paul Ibison SQL Server MVP, www.replicationanswers.com .

Lavanya
1/1/2007 9:17:13 PM
Am not really sure of the implementation of SQL option in
insert/update/delete commands.
Can you please help me out?

Thanks,
Lavanya

[quoted text, click to view]
Paul Ibison
1/2/2007 9:22:35 PM
Lavanya,
have a look at teh article properties (elipsis button). I don't have access
here but from memory there is a tab called "Commands". There you can set the
replication engine to replicate SQL rather than execute stored procedures on
the subscriber. Have a look in BOL for the rel;evant TSQL:
http://msdn2.microsoft.com/zh-cn/library/aa239392(SQL.80).aspx - @ins_cmd =
'SQL' etc. Please post back if any of this is unclear.
Cheers,
Paul Ibison SQL Server MVP, www.replicationanswers.com .

AddThis Social Bookmark Button