Showing posts with label subscriber. Show all posts
Showing posts with label subscriber. Show all posts

Thursday, March 22, 2012

Bilateral Transactional Replication Problem

Hi,

I have 4 servers formed with bilateral transactional replication (each server is distributing, publicator and subscriber), the problem is that the transactionals processes to be failing in the application client as soon as the subscriptions is activate.

Please help me!!

dark.otakon@.gmail.com

What kind of errors do you have?

To set up bidirectional replication, you need to run on "loopback detection" at the publication level. And you can not have loops in the replication topology.

If you are using SQL Server 2005, you can consider peer to peer replication.

|||

I am using Sql Server 2000 with SP4, I am creating the subscriptions with the script:

exec sp_addsubscription @.publication = N'TRAFICO', @.article = N'all', @.subscriber = N'DCI-APP', @.destination_db = N'HHSITR', @.sync_type = N'none', @.update_mode = N'read only', @.offloadagent = 0, @.dts_package_location = N'distributor',@.loopback_detection = 'true'

The error is in the application client is "Cannot find the member name "Systema.Data.SqlClient.SqlError.""

Sunday, March 11, 2012

bidirectionnal connection fro merge replication?

Hello, I only need to know if I need to have a bidirectionnal connection between the subscriber and the publisher for merge replication or if the connection ca be openned only from the publisher to the subscriber if i use the push subscription option.
Thanks in advanceIn a push merge replication scenario you still need to ensure that there is a communication going when new transactions are posted on the subscriber(-s)'s side.

Bi-Directional replication without changing scema on subscriber

Hello - I am a newbie to Replication.
Can I setup Bi-Directional replication without introducing the guid column
on the subscriber? All the tables have Primary Keys.
Thanks.
-A
Adam - yes - columns are only added for updatable subsriptions and merge.
Cheers,
Paul Ibison SQL Server MVP, www.replicationanswers.com
(recommended sql server 2000 replication book:
http://www.nwsu.com/0974973602p.html)

Thursday, March 8, 2012

bi directional transactional replication and subscriber name

Hi,
I am trying to setup bi-directional transactional replication between 2 SQL Servers,
I add the subscription on both the servers using the code below.

EXEC sp_addsubscription @.publication = N'test',
@.article = N'all', @.subscriber = 'AnyServer',
@.destination_db = N'test', @.sync_type = N'none',
@.status = N'active', @.update_mode = N'read only',
@.loopback_detection = 'true'
GO

I have defined 'AnyServer' on both the servers using cliconfg
(Server1's AnyServer pointed towards Server2 and Server2's AnyServer pointed towards Server1, I need to do that because there is a restriction to run the same code on both the servers),

After inserting a record on server1 in the 'test' database, the changes successfully transfers to the server2, then server2 sends it back to server1 and server1 generates the error of

"Violation of PRIMARY KEY constraint 'PK_Table1'. Cannot insert duplicate key in object 'Table1'."

It seems as if loop detection is failing if I keep the same subscriber name on both sides.

It runs fine when I change the subscriber name in the subscription (@.subscriber = 'Server2' for server1 and @.subscriber = 'Server1' for server2).

Can anybody explains this behavior to me?not really , but common sense says that if you try & create a duplicate primary key on the first server, it MUST fail to preserve PK integrity...|||Let me rephrase my question.....

Why bi-directional replication is failing with the same subscriber name (managed by cliconfg) on both sides.... when it is running fine with the real server names?

Saturday, February 25, 2012

better way to fix broken replication?

If replication ever blows up with an error like:
"The row was not found at the Subscriber when applying the replicated
command."
There is only one way I know to fix it:
Read the Last Command in the "Distribution Agent Error Details" box:
{CALL sp_MSupd_AcctHistory
(NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL,2005-01-01 00:00:00,7,0x0001)}
Then do a:
exec sp_browsereplcmds
and look for that same line from above. Grab the xact_seqno. Will this
always be the first row in the result set as in my testing?
Then do a:
select * from MSRepl_commands
where xact_seqno = 0x0000002C000000440001
and then delete those rows.
Is there a better way?
SQL2K SP3
TIA, ChrisR
no, insert a dummy record in the subscriber with the specific pk. Then
restart your agent.
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
"ChrisR" <bla@.noemail.com> wrote in message
news:umzuGUlKFHA.3132@.TK2MSFTNGP12.phx.gbl...
> If replication ever blows up with an error like:
> "The row was not found at the Subscriber when applying the replicated
> command."
> There is only one way I know to fix it:
>
> Read the Last Command in the "Distribution Agent Error Details" box:
> {CALL sp_MSupd_AcctHistory
> (NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL,2005-01-01 00:00:00,7,0x0001)}
> Then do a:
> exec sp_browsereplcmds
> and look for that same line from above. Grab the xact_seqno. Will this
> always be the first row in the result set as in my testing?
> Then do a:
> select * from MSRepl_commands
> where xact_seqno = 0x0000002C000000440001
> and then delete those rows.
> Is there a better way?
>
> --
> SQL2K SP3
> TIA, ChrisR
>
|||Far too easy! ;-)
Thanks.
"Hilary Cotter" <hilary.cotter@.gmail.com> wrote in message
news:#mogudlKFHA.1476@.TK2MSFTNGP09.phx.gbl...
> no, insert a dummy record in the subscriber with the specific pk. Then
> restart your agent.
> --
> 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
> "ChrisR" <bla@.noemail.com> wrote in message
> news:umzuGUlKFHA.3132@.TK2MSFTNGP12.phx.gbl...
>
|||What about other scenarios where thats not an option. Say the Publisher has
a column that allows NULL's, but for some lame reason the Subscriber
doesn't? A row with a NULL gets Inserted into the Publisher, but chokes out
replication when it tries to insert into the Subscriber.
"Hilary Cotter" <hilary.cotter@.gmail.com> wrote in message
news:#mogudlKFHA.1476@.TK2MSFTNGP09.phx.gbl...
> no, insert a dummy record in the subscriber with the specific pk. Then
> restart your agent.
> --
> 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
> "ChrisR" <bla@.noemail.com> wrote in message
> news:umzuGUlKFHA.3132@.TK2MSFTNGP12.phx.gbl...
>
|||use your replication stored procedures to test for this condition and
possibly use coalesce to insert a value.
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
"ChrisR" <bla@.noemail.com> wrote in message
news:OhvcallKFHA.3552@.TK2MSFTNGP12.phx.gbl...
> What about other scenarios where thats not an option. Say the Publisher
has
> a column that allows NULL's, but for some lame reason the Subscriber
> doesn't? A row with a NULL gets Inserted into the Publisher, but chokes
out[vbcol=seagreen]
> replication when it tries to insert into the Subscriber.
>
> "Hilary Cotter" <hilary.cotter@.gmail.com> wrote in message
> news:#mogudlKFHA.1476@.TK2MSFTNGP09.phx.gbl...
00:00:00,7,0x0001)}
>