Showing posts with label bi-directional. Show all posts
Showing posts with label bi-directional. Show all posts

Sunday, March 11, 2012

bi-directional vs updatable subscriptions

Bi-directional replication strictly speaking is where you have data
modification on any node moving to all nodes in a system, it includes merge
replication, bi-directional transactional replication, snapshot replication
with immediate updating, snapshot replication with queued updating,
transactional replication with
immediate updating, transactional replication with queued updating, and peer
to peer replication.
I am ignoring immediate updating with queued failover here.
Now, let me climb down from my soap box,
bi-directional transactional replication doesn't scale well to multiple
nodes, it locks you into a schema, but there are no schema modifications.
Immediate uses MSDTS (distributed transactions) which is not resilient to
network hicupps, and adds latency to all DML originating on the subscriber.
It adds a guid column to each table you are replicating, it is not really
scalable beyond 10 subscribers, and it will log conflicts but not allow you
to roll them back. It is best used when the majority of the DML originates
on the published. Queued updating uses a queue to replicate DML, it is not
scalable beyond 10 subscribers, adds a guid column to every table you are
replicating, adds latency to all DML originating on the subscriber, and is
best used when the majority of the DML originates on the publisher.
Conflicts are logged but cannot be rolled back.
Merge replication is designed for large numbers of subscribes, works well
when the majority of the DML originates on the publisher or subscriber, has
rich conflict logging and resolution, and adds a guid column to every table
you are replicating.
I use bi-directional replication in DR environments where it can work well,
keeping in mind there is no automatic failover and you are locked into a
schema.
HTH
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
"Rob" <Rob@.discussions.microsoft.com> wrote in message
news:9C060D84-80E7-4754-B1B0-6280E64ADDFE@.microsoft.com...
> What is the difference between Bi-directional and Updatable Subscriptions
> Transactional Replication? Conceptually, they seem to be the same... or
> are
> they?
No, most of it is experience
The caveats about where the majority of the DML occurs is documented. Have a
look at these links for more info.
http://msdn2.microsoft.com/en-us/library/aa237486(SQL.80).aspx
http://msdn2.microsoft.com/en-US/library/aa237271(sql.80).aspx
http://msdn2.microsoft.com/en-US/library/aa237346(SQL.80).aspx
http://msdn2.microsoft.com/en-US/library/aa256086(SQL.80).aspx
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
"Rob" <Rob@.discussions.microsoft.com> wrote in message
news:8E39CB8A-06F6-4318-A3A2-00948098CC07@.microsoft.com...[vbcol=seagreen]
> Wow! Thank you for taking the time to explain this so well.
> Just wondering on the some of the limitation that you had mentioned. For
> instance, "...not scalable beyond 10 subscribers"; "...locks you into a
> schema, but there are no schema modifications". Is that documented
> anywhere
> in BOL and/or on Microsoft's website where more info on those limitations
> are
> discussed in depth?
> Thanks again.
> "Hilary Cotter" wrote:

Bi-Directional Updating Databases on same SQL server

I am trying to separate two applications sharing the same database and a few tables(like t_employee) in a phased approach. How can I best setup a bi-directional update of this t_employee table when updated by either application?
Thanks,
Memphodave
Message posted via http://www.sqlmonster.com
Have a look at bi-directional transactional replication.
it is covered in SP3 books online.
Hilary Cotter
Looking for a SQL Server replication book?
http://www.nwsu.com/0974973602.html
"David Walpole via SQLMonster.com" <forum@.SQLMonster.com> wrote in message
news:be07a9381051493195afb35c1f13161d@.SQLMonster.c om...
> I am trying to separate two applications sharing the same database and a
few tables(like t_employee) in a phased approach. How can I best setup a
bi-directional update of this t_employee table when updated by either
application?
> Thanks,
> Memphodave
> --
> Message posted via http://www.sqlmonster.com

Bi-Directional Transactional replication?

Has anyone successfully implemented Bi-Directional Transactional replication?
The documentation on BoL is very limited and there are not too many info
available outside too. We are planning to have active-active SQLServers, that
needs dynamic transactional replication.
I would really appreciate practical advise on BiDirectional Transactional
Replication?
Attention : Paul Ibison and JD . This is the same thread that I created
last month. I couldn't find a way to bump it up so that it becomes active
again. I did also change the subject a little bit, so that it is clear.
I have, it is pretty solid, but is not resilient to schema changes. Also
conflicts can be a pain, so the more you partition your data the easier life
will be for you.
"HowdyDowdy" <HowdyDowdy@.discussions.microsoft.com> wrote in message
news:55B8E404-3560-4016-98E1-68EA35A35F79@.microsoft.com...
> Has anyone successfully implemented Bi-Directional Transactional
> replication?
> The documentation on BoL is very limited and there are not too many info
> available outside too. We are planning to have active-active SQLServers,
> that
> needs dynamic transactional replication.
> I would really appreciate practical advise on BiDirectional Transactional
> Replication?
> Attention : Paul Ibison and JD . This is the same thread that I created
> last month. I couldn't find a way to bump it up so that it becomes active
> again. I did also change the subject a little bit, so that it is clear.
|||HC,
Do you have the Bi-Di trans repl described in detail in your book? Are there
samples in there?
Please let me know.
Thanks,
"Hilary Cotter" wrote:

> I have, it is pretty solid, but is not resilient to schema changes. Also
> conflicts can be a pain, so the more you partition your data the easier life
> will be for you.
>
> "HowdyDowdy" <HowdyDowdy@.discussions.microsoft.com> wrote in message
> news:55B8E404-3560-4016-98E1-68EA35A35F79@.microsoft.com...
>
>
|||Yes, there are. There are some in the update BOL which are pretty good as
well.
Hilary Cotter
Looking for a SQL Server replication book?
http://www.nwsu.com/0974973602.html
"HowdyDowdy" <HowdyDowdy@.discussions.microsoft.com> wrote in message
news:13B145A7-84DF-465F-B486-E780F4C9E9BB@.microsoft.com...
> HC,
> Do you have the Bi-Di trans repl described in detail in your book? Are
there[vbcol=seagreen]
> samples in there?
> Please let me know.
> Thanks,
> "Hilary Cotter" wrote:
life[vbcol=seagreen]
info[vbcol=seagreen]
SQLServers,[vbcol=seagreen]
Transactional[vbcol=seagreen]
created[vbcol=seagreen]
active[vbcol=seagreen]
clear.[vbcol=seagreen]
|||Thanks, Hillary.
I did see the udpated BOL and also an article from www.SqlMag.Com that
talked about BDT replication.
"Hilary Cotter" wrote:

> Yes, there are. There are some in the update BOL which are pretty good as
> well.
> --
> Hilary Cotter
> Looking for a SQL Server replication book?
> http://www.nwsu.com/0974973602.html
> "HowdyDowdy" <HowdyDowdy@.discussions.microsoft.com> wrote in message
> news:13B145A7-84DF-465F-B486-E780F4C9E9BB@.microsoft.com...
> there
> life
> info
> SQLServers,
> Transactional
> created
> active
> clear.
>
>

bi-directional transactional replication vs transactional replication with queued updating

Can someone help me understand the what the differences are between the
different types of bi-directional transactional replication, i.e
1) bi-directional transactional replication
2) transactional replication with queued updating,
Thanks
Bi-Directional replication is when a subscriber publishes back to the
publisher. You can only do this between two nodes, ie one publisher
subscriber pair. You need to partition carefully to minimize conflicts.
Queued updating using a queue (a SQL Server table or MSMQ). You can scale up
to about 10 clients - performance is not good after this. Queued updating
uses triggers on the subscriber and a tracking column.
HTH
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
"William F. Kinsley" <bacardi@.noemail.nospam> wrote in message
news:OABBHP4aFHA.2860@.TK2MSFTNGP10.phx.gbl...
> Can someone help me understand the what the differences are between the
> different types of bi-directional transactional replication, i.e
> 1) bi-directional transactional replication
> 2) transactional replication with queued updating,
> Thanks
>
>

Bi-Directional Transactional Replication - Problem

Two Servers,
1st 2nd
database a --> after replication a'
b' <-- after replication b
on 1st server a is replicated to 2nd
on 2nd server b is replicated to 1st
I tried with merge replication it is working fine.But if i tried to use
transactional replication it give some error like "access
violation".Using tansactional replication is it possible.plz help me to
slove this problem.
Regards,
Senthil prabu R
When you used sp_addsubscription, did you set @.loopback_detection=true?
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
"senthilprabu" <senthilpraburaju@.gmail.com> wrote in message
news:1125116841.951132.162370@.o13g2000cwo.googlegr oups.com...
> Two Servers,
> 1st 2nd
> database a --> after replication a'
> b' <-- after replication b
> on 1st server a is replicated to 2nd
> on 2nd server b is replicated to 1st
> I tried with merge replication it is working fine.But if i tried to use
> transactional replication it give some error like "access
> violation".Using tansactional replication is it possible.plz help me to
> slove this problem.
> Regards,
> Senthil prabu R
>

Bi-directional Transaction Replication

Besides loopback detection, is there anything else that is needed to prevent the replication command from sending back to the source. Cos i am having problem with the subscriber B sending back the replication to A in the form of B as the publisher and A as the subscriber.
:confused:hi
what is the problem? a error in the sync. Can you writr more information about your problema.

TIA
Abel.|||It gives me an error " violation of primary key constraint..." And when i search the record at the subscriber, it shows that the record is already there. Meaning A send to B...then B send to A...If I'm not wrong in reading about loopback detection, B shouldnt send to A already...correct me if I'm wrong. Tks.|||hi, you have a Transactional replication in a SQL Server? this type of replication not is a "bi-direccional" (by defualt, the data of subscriber be read only, do you can't modified this data), how implement this replication?
In your case use the merge, this type of replication is "bi-directional".

bye.
Abel.

Bi-directional Transaction Replication

Two Servers,

1st 2nd
database a ---> after replication a'
b' <--- after replication b

on 1st server a is replicated to 2nd
on 2nd server b is replicated to 1st

I tried with merge replication it is working fine.But if i tried to use
transactional replication it give some error like "access
violation".Using tansactional replication is it possible.plz help me to
slove this problem.

Regards,
Senthil prabu RI have no idea myself, but under "Nonpartitioned, Bidirectional,
Transactional Replication", Books Online says that to implement
bidirectional transactional replication "substantial customization and
programming is usually required."

So you might get a better response in
microsoft.public.sqlserver.replication, as it seems to be something
quite specialized.

Simon

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)

BiDirectional Replication

Has anyone successfully implemented Bi-Directional Transactional replication?
The documentation on BoL is very limited and there are not too many info
available outside too. We are planning to have active-active SQLServers, that
needs dynamic transactional replication.
I would really appreciate practical advise on BiDirectional Transactional
Repl.
This should help:
http://support.microsoft.com/default...b;en-us;820675
http://msdn.microsoft.com/library/de...lsamp_3ve6.asp
Rgds,
Paul Ibison
|||Paul,
I did already find this info from BoL.
I am looking for someone who has done this already. I spoke to a few DBAs
who haven't heard of this, but they have implemented Transaction Repl before.
"Paul Ibison" wrote:

> This should help:
> http://support.microsoft.com/default...b;en-us;820675
> http://msdn.microsoft.com/library/de...lsamp_3ve6.asp
> Rgds,
> Paul Ibison
>
>
|||This info is not in BOL - there are many setup scripts in the links I
posted. I have implemented it but didn't like the fact that I had to write
my own conflict resolvers and opted for merge instead, despite its overall
slower transfer rate (unless you are updating the same row many times I
would expect this to be generally the case). Also, schema changes will be
more restrictive. Hilary had implemented it in his work, so he can probably
add more if you want to go down this path.
Rgds,
Paul Ibison SQL Server MVP, www.replicationanswers.com
(recommended sql server 2000 replication book:
http://www.nwsu.com/0974973602p.html)
|||Thanks, Paul. I do appreciate your time.
Hillary, Can you please shed some light on this?
PS : Paul : The updated BoL is available as a download contains the link
that you specified in your first response. I thought of providing this info,
so that people are aware of the availability of the updated BoL.
"Paul Ibison" wrote:

> This info is not in BOL - there are many setup scripts in the links I
> posted. I have implemented it but didn't like the fact that I had to write
> my own conflict resolvers and opted for merge instead, despite its overall
> slower transfer rate (unless you are updating the same row many times I
> would expect this to be generally the case). Also, schema changes will be
> more restrictive. Hilary had implemented it in his work, so he can probably
> add more if you want to go down this path.
> Rgds,
> Paul Ibison SQL Server MVP, www.replicationanswers.com
> (recommended sql server 2000 replication book:
> http://www.nwsu.com/0974973602p.html)
>
>
|||Well spotted - I'm using the old one at home. Thanks for the correction
Rgds,
Paul Ibison
"HowdyDowdy" <HowdyDowdy@.discussions.microsoft.com> wrote in message
news:A961EFBF-5E13-4178-902B-4C50F8972038@.microsoft.com...
> Thanks, Paul. I do appreciate your time.
> Hillary, Can you please shed some light on this?
> PS : Paul : The updated BoL is available as a download contains the link
> that you specified in your first response. I thought of providing this
info,[vbcol=seagreen]
> so that people are aware of the availability of the updated BoL.
>
> "Paul Ibison" wrote:
write[vbcol=seagreen]
overall[vbcol=seagreen]
be[vbcol=seagreen]
probably[vbcol=seagreen]

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?