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

Tuesday, March 27, 2012

distrib.exe taking 100% of CPU

Hi,
I have bidirectional replication configured between 3 servers. Server A as
the distributor and publisher.
1. I have A publish to B and C.
2. A subcribes to B and C (push to A from B and C)
3. B publishes to and subscribes only to A. (push to A from B)
4. C publishes to and subscribes only to A. (push to A from C)
When I fire a transaction on A that includes several tables, I am getting
locking on 2 tables and the distrib.exe process runs continuosly and cannot
stop it from the task manager.
Any Ideas anyone?
AL
did you set loopback_detection=true?
"AL_LONGO" <AL_LONGO@.discussions.microsoft.com> wrote in message
news:FA5FA7A3-C8E9-4701-B3FC-60227A1B1EE6@.microsoft.com...
> Hi,
> I have bidirectional replication configured between 3 servers. Server A as
> the distributor and publisher.
> 1. I have A publish to B and C.
> 2. A subcribes to B and C (push to A from B and C)
> 3. B publishes to and subscribes only to A. (push to A from B)
> 4. C publishes to and subscribes only to A. (push to A from C)
> When I fire a transaction on A that includes several tables, I am getting
> locking on 2 tables and the distrib.exe process runs continuosly and
> cannot
> stop it from the task manager.
> Any Ideas anyone?
> AL
>
|||Hilary,
Yes, I used scripts to setup replication and double checked and it is in
fact there.
Any Ideas?
AL
"Hilary Cotter" wrote:

> did you set loopback_detection=true?
> "AL_LONGO" <AL_LONGO@.discussions.microsoft.com> wrote in message
> news:FA5FA7A3-C8E9-4701-B3FC-60227A1B1EE6@.microsoft.com...
>
>
|||Yes!
Any other Ideas?
AL
"Hilary Cotter" wrote:

> did you set loopback_detection=true?
> "AL_LONGO" <AL_LONGO@.discussions.microsoft.com> wrote in message
> news:FA5FA7A3-C8E9-4701-B3FC-60227A1B1EE6@.microsoft.com...
>
>
|||can you run profiler to see what is going on. Sometimes the distrib.exe will
cause high cpu utilization on initialization, but normally this is
transitory. There have been reports that it can be solved by a reboot.
"AL_LONGO" <ALLONGO@.discussions.microsoft.com> wrote in message
news:FEB163AA-579D-4136-8270-7CA671AE920C@.microsoft.com...[vbcol=seagreen]
> Hilary,
> Yes, I used scripts to setup replication and double checked and it is in
> fact there.
> Any Ideas?
> AL
> "Hilary Cotter" wrote:

Distrib agent question

From BOL
CommitBatchThreshold 1000 The number of replication commands to be
issued to the Subscriber before a COMMIT statement is issued.
So if the distrib agent report 1 transaction with 100,000 commands are
replicated, i guess the above CommitBatchThreshold of 1000 does not apply..
right ? It appears that it commits only after the 100,000 commands make it
to the subscriber . Am I right ? Can i commit on the subscriber 1000
commands at a time ?
Not really, one commit will be called. One commit will occur in increments
of 1000, so one commit will be called from 1 to 1000 transactions. For 1001
to 2000 there will be 2, 2000>3000 3, etc.
The commit is done on a per transaction basis as opposed to a per command
basis.
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
"Hassan" <fatima_ja@.hotmail.com> wrote in message
news:%232IwOPmYFHA.2076@.TK2MSFTNGP15.phx.gbl...
> From BOL
> CommitBatchThreshold 1000 The number of replication commands to be
> issued to the Subscriber before a COMMIT statement is issued.
>
> So if the distrib agent report 1 transaction with 100,000 commands are
> replicated, i guess the above CommitBatchThreshold of 1000 does not
> apply..
> right ? It appears that it commits only after the 100,000 commands make it
> to the subscriber . Am I right ? Can i commit on the subscriber 1000
> commands at a time ?
>
|||I have 1 transaction with 100,000 commands..
Do you mean it will commit 1000 commands at a time..
Im a lil confused as your message indicates transactions and not commands
"Hilary Cotter" <hilary.cotter@.gmail.com> wrote in message
news:O4Y1LzRZFHA.2768@.tk2msftngp13.phx.gbl...
> Not really, one commit will be called. One commit will occur in increments
> of 1000, so one commit will be called from 1 to 1000 transactions. For
1001[vbcol=seagreen]
> to 2000 there will be 2, 2000>3000 3, etc.
> The commit is done on a per transaction basis as opposed to a per command
> basis.
> --
> 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
> "Hassan" <fatima_ja@.hotmail.com> wrote in message
> news:%232IwOPmYFHA.2076@.TK2MSFTNGP15.phx.gbl...
it
>
|||The way I read it: one commit, no matter how many commands per transaction.
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
"Hassan" <fatima_ja@.hotmail.com> wrote in message
news:uaN5P6SZFHA.1368@.tk2msftngp13.phx.gbl...[vbcol=seagreen]
> I have 1 transaction with 100,000 commands..
> Do you mean it will commit 1000 commands at a time..
> Im a lil confused as your message indicates transactions and not commands
> "Hilary Cotter" <hilary.cotter@.gmail.com> wrote in message
> news:O4Y1LzRZFHA.2768@.tk2msftngp13.phx.gbl...
increments[vbcol=seagreen]
> 1001
command[vbcol=seagreen]
be[vbcol=seagreen]
are[vbcol=seagreen]
make
> it
>

Distinguish changes by replication and changes by user

Hello,
Merge Replication, SQL Server 2005
I have got a table with an update trigger that is supposed to fire when a
user updates a field.
When replicating this database, the trigger fires when a user updates a
field *and* when the update is performed by the replication process.
How can I avoid the latter? Is there a TSQL-function to distinguish the two?
Thanks for your effort, Wolfgang
Another way is to hack into the sessionproperty
ie if ('replication_agent') <> 1 then its a user action.
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
"Wolfgang" <Wolfgang@.discussions.microsoft.com> wrote in message
news:168538E7-89A2-45F3-ABD6-566F2C4B3760@.microsoft.com...
> Hello,
> Merge Replication, SQL Server 2005
> I have got a table with an update trigger that is supposed to fire when a
> user updates a field.
> When replicating this database, the trigger fires when a user updates a
> field *and* when the update is performed by the replication process.
> How can I avoid the latter? Is there a TSQL-function to distinguish the
> two?
> Thanks for your effort, Wolfgang
sql