Showing posts with label replication. Show all posts
Showing posts with label replication. Show all posts

Wednesday, March 28, 2012

one conflict > all other replication hangs

hi all

let's say i have three publications running on a network of one central server and four shops.

- a merge replication that keeps the price-table up to date between all shops and the central server

- a transactional replication of the arrived_orders-table from the central server to the shop in case

- a transactional replication of the sold_products-table fromt he shops to the central server.

the whole replication network runs on a distribution database that is located on the central server.

now, i've noticed already a few times, when a conflict occurs in one of the replications, also all other replications stop working. (for example when the transactional replication can not insert a line in the sold_products table because of a violation against a UNIQUE constraint in the central server).

Is it normal that also the merge replication and the other transactional replication don't do their inserts, updates etc any more?

Thanks

Different replications uses different instances of replication agent (logreader, distribution and merge). Other replication agents should continue when one agent fails. Does other agents run at all, or they are having failures also?

Peng

|||@.peng song
they don't use the same distribution agent, isn't it?
i configured only once my distribution database on my central server.... only once (!).... and you say that they use other distribution agent?

can someone explain this?
|||

although you may use one distribution database, there are different distribution/merge agent processes running for each of the replication. So you need to take a look at the error message for the other agent jobs and do the troubleshooting from there.

Peng

|||@.peng song: and about a log reader agent?
if several publications exist of one and the same table of a database, then it uses the same log reader agent or does it uses for each publication another instance?

this comes into my mind because in the scripts i have to install, i have one script that has to be installed in advance:

use [DBX]
exec sp_replicationdboption @.dbname = N'dbx', @.optname = N'publish', @.value = N'true'
GO
use [DBX]
exec [dbx].sys.sp_addlogreader_agent @.job_login = N'pcn\login', @.job_password = pwx, @.publisher_security_mode = 0, @.publisher_login = N'login', @.publisher_password = N'pwx', @.job_name = null
GO

this is the only place in my scripts that i have to install, where i see the sp_addlogreader_agent.... this is slightly in contradiction to what you say above, that for each replication another instance is created.

am i right or am i wrong?
(it's also possible that the scripts that i received are wrong of course)
|||i found maybe the problem.
it was the log reader agent that failed at all transactional replications.

there is still a question:
is there one log reader agent per publication, or one log reader agent per table (on which replication is installed) ?

(so if i have multiple transactional publications of one table, is there one log reader agent or multiple?)
|||

There is one logreader agent for each published database. So if there are multiple publications on a single database, there is only one log reader.

Your origional post indicates that your two transactional publications are on different server. So I assume they are using different agents.

What error message do you see.

Peng

|||

the problem was only in the second point of my original post.

(i found after investigation that the merge replication and the third replication of my original post still continued to do their job fine).

the problem was only in the publications of the deliveredOrders-table on the central server.

for specific reasons i created a transactional publication of the deliveredorders-table on the central server towards each shop (so a filtered publication for each shop).

the error i got was this: "The process could not execute 'sp_replcmds" for all publications of that type.

All publications failed.

my solution was: i recreated all publications, and now it works fine again since ten days ago.

the problem was probably that i exported one script to install one publication of that type, and for all other publications i copy-pasted the file and just updated manually the parameters. probably something was badly changed while manually changing the installation scripts.

sql

Monday, March 26, 2012

On the Fly Schema Changes in Merge Replication

I have always assumed that I must completely disable replication to make any
sort of change to published articles, but these article seem to say
otherwise:
http://msdn.microsoft.com/library/de...limpl_22pf.asp
http://msdn.microsoft.com/library/de...lctem_6l61.asp
I would like to add a column to an existing published article (during low
activity hours), but it seems to me a new snapshot would need to be created
(plus re-initialization of subscribers). My subscribers can be unavailable
for days (off-line but updating and inserting all the while). I can
understand that subscriber updates to the article may be lost at
re-initialization, but are other tables adversly effected?
I'm confused - why do you think that a snapshot would be necessary? The
article may have misled you - if the column already exists and has data in
it, then you're right, but if it an entirely new column, sp_repladdcolumn
will do the trick without new snapshots, reinitialization etc.
HTH
Paul Ibison SQL Server MVP, www.replicationanswers.com
(recommended sql server 2000 replication book:
http://www.nwsu.com/0974973602p.html)
|||Thanks Paul.
I suppose my assumptions about a snapshot were incorrect. I thought that
any schema change would require a new snapshot. So I will not need to worry
about my off-line subscribers losing data.
Where can I find more information about what information is kept in a
snapshot?
"Paul Ibison" <Paul.Ibison@.Pygmalion.Com> wrote in message
news:ehwOt0sgFHA.3000@.tk2msftngp13.phx.gbl...
> I'm confused - why do you think that a snapshot would be necessary? The
> article may have misled you - if the column already exists and has data in
> it, then you're right, but if it an entirely new column, sp_repladdcolumn
> will do the trick without new snapshots, reinitialization etc.
> HTH
> Paul Ibison SQL Server MVP, www.replicationanswers.com
> (recommended sql server 2000 replication book:
> http://www.nwsu.com/0974973602p.html)
>
|||Run the snapshot agent then have a look in the distribution working folder -
you'll see a bunch of text files to create teh schema, bcp data files, index
creation scripts etc. The exact files created depend mostly on the article
properties selected.
HTH
Paul Ibison SQL Server MVP, www.replicationanswers.com
(recommended sql server 2000 replication book:
http://www.nwsu.com/0974973602p.html)
|||Thanks for the help!

Monday, February 20, 2012

Old Subscriptions?

Hello, I have a server that lists several Subscriptions (under Replication ->
Subscriptions in Enterprise Manager) that are no longer in use. Two of them
reference a server that was decomissioned over a year ago which no longer
exists.
Why do these old subscriptions still show up in the Subscriptions list? Is
there a way to remove them? If so, how?
I would appreciate any feedback...
Thanks,
John
You can have a look at sp_MSenumsubscriptions to see what is happening when
you click on the subscriptions folder. The key tables in each subscribing
databases are sysmergesubscriptions and MSreplication_subscriptions. If this
database is no longer a subscriber, then run sp_removedbreplication, which
removes the redundant system tables. If you want these tables to remain,
then simply locate the redundant record in the above relevant system table
and delete it.
Rgds,
Paul Ibison SQL Server MVP, www.replicationanswers.com
(recommended sql server 2000 replication book:
http://www.nwsu.com/0974973602p.html)