Showing posts with label merge. Show all posts
Showing posts with label merge. Show all posts

Wednesday, March 21, 2012

How to get the amount of bytes exchanged during a Merge replication between 2 MSSQL server

Hi, guys.
A very simple question for all of you: how can I get the amount of
bytes exchanged during a Merge replication between two Microsoft SQL
2000 servers?

Thank you.
Bye,
Angelo.-"Angelo Mariani" <pzgrgr@.hotmail.com> wrote in message
news:d03f5ff7.0407190523.3284dd8a@.posting.google.c om...
> Hi, guys.
> A very simple question for all of you: how can I get the amount of
> bytes exchanged during a Merge replication between two Microsoft SQL
> 2000 servers?
> Thank you.
> Bye,
> Angelo.-

I don't believe there's any API to get this information - you could use
Perfmon to trace the merge agent changes per second, and make an estimate
based on average row size, but that's probably not going to be very
accurate. You may want to post in microsoft.public.sqlserver.replication to
see if you get a better answer.

Simon

Monday, March 19, 2012

How to get started on custom Merge Join component?

I need to extend the functionality of the Merge Join transformation to allow more complex joining scenarios. I have found some quickstarts on custom components (i.e. Hash Transform, etc.), however I haven't found any good references on more advanced tasks like processesing multiple inputs. Any ideas?

TIA,

Matthew

First as a disclaimer I would advise against this, as writing a multi imput component is significantly more complex that writing a single input component due to the threading that needs to be done in just about all scenarios.

With that said you can look at any of the samples that have async outputs as a good starting point. The additional complexity comes from the fact that you will, most likely, need to implement your own threading in order to do the merging. This means you will need to make a copy of the buffers to pass to your thread that does the merging. You need this threading because depending on the package both of your inputs could be called on the same thread and if you just waited on one input for the other input to get data then you would hang. All the stock multi input components do their own threading except for UnionAll because that one doesn't have any inter input dependencies to write the data to it output.

HTH,
Matt

|||Matt,

Thanks for the reply. I haven't seen any samples showing async outputs. Could you post a link?

Thanks!

Matthew|||BOL has a RemoveDuplicates sample which has an async output. You can look for sample applications[Integration Services] in the index.

Matt

Wednesday, March 7, 2012

How to get old data to upload

Hello,
I have a Merge Replication setup between a publisher and a subscriber.
About a month ago the replication failed. We have recently reconfigured the
replication(recreated the publications, distributors, and each of the
subscribers) and got it all going fine now, no errors.
My issue is that during that 1 month period while the replication had failed
and was disabled/deleted there were changes being made at the subscirber.
Everything seems to be replicating EXCEPT those changes that were made at the
subscriber during the down month. I've tring to reapply the snapshots with
the "upload data" option and all kinds of other stored procedures with not
luck.
How can I get that data that was entered when the replication links were
deleted to resync?
Thanks
run a validation. Determine the data which is out of sync/missing. Then
update the data setting a column to the same value or insert it on the
publisher if it is missing. Resolve conflicts.
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
"James Jegers" <JamesJegers@.discussions.microsoft.com> wrote in message
news:FC72E75B-D4E9-47D3-89EA-8AF0EC863990@.microsoft.com...
> Hello,
> I have a Merge Replication setup between a publisher and a subscriber.
> About a month ago the replication failed. We have recently reconfigured
the
> replication(recreated the publications, distributors, and each of the
> subscribers) and got it all going fine now, no errors.
> My issue is that during that 1 month period while the replication had
failed
> and was disabled/deleted there were changes being made at the subscirber.
> Everything seems to be replicating EXCEPT those changes that were made at
the
> subscriber during the down month. I've tring to reapply the snapshots
with
> the "upload data" option and all kinds of other stored procedures with not
> luck.
> How can I get that data that was entered when the replication links were
> deleted to resync?
> Thanks
|||Thanks for answering my question about SQL replication: see below.
From what I am gathering from you, I need to MANUALLY determine which data
is out of sync and then update those rows on the subscriber (by setting a
value to itself?, eg. Update table set datefield=datefield where datefield
= someday) and that will merge in those values. Is this correct?
I think I can do this. It will just be a pain as the remote subscribers
are over a slow link and the database is a couple gigs in size. So
determining which rows are different/missing is going to be difficult. I
suppose I could add a linked server and do a query where the join fails, or I
found a SQL db compare tool from Red Gate software that does DB compares, but
comparing huge databases across slow lines will take forever. Any thoughts?
Thanks again!
"Hilary Cotter" wrote:

> run a validation. Determine the data which is out of sync/missing. Then
> update the data setting a column to the same value or insert it on the
> publisher if it is missing. Resolve conflicts.
> --
> 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
> "James Jegers" <JamesJegers@.discussions.microsoft.com> wrote in message
> news:FC72E75B-D4E9-47D3-89EA-8AF0EC863990@.microsoft.com...
> the
> failed
> the
> with
>
>

How to get next range of Ident values for Merge Replication

You can use sp_adjustpublisheridentityrange on the
publisher.
HTH,
Paul Ibison SQL Server MVP, www.replicationanswers.com
(recommended sql server 2000 replication book:
http://www.nwsu.com/0974973602p.html)
Hi Paul,
Is there a method to specify what the next seed value should be?
Thanks
"Paul Ibison" <Paul.Ibison@.Pygmalion.Com> wrote in message
news:1bc101c4fd41$e9448560$a301280a@.phx.gbl...
> You can use sp_adjustpublisheridentityrange on the
> publisher.
> HTH,
> Paul Ibison SQL Server MVP, www.replicationanswers.com
> (recommended sql server 2000 replication book:
> http://www.nwsu.com/0974973602p.html)
>
|||You could hack into MSrepl_identity_range but I
definitely wouldn't advise this. I know this sounds a
pain, but to avoid any issues like this, I'd consider
reinitializing and setting such a large range that this
can never be an issue in future - either that or manual
range management, but that can be difficult to set up if
you have a lot of subscribers.
Rgds,
Paul Ibison SQL Server MVP, www.replicationanswers.com
(recommended sql server 2000 replication book:
http://www.nwsu.com/0974973602p.html)

Sunday, February 19, 2012

how to get host_name in .net programming for subscribers

Hi all...
While setting up my merge replication through the replication wizard in I
read that the use of HOST_NAME() in the dynamic filter returns the
Subscriber's Machine Name. How to get host_name() value in .net code can
anyone give or suggest the code
how to write to get host_name and where i have to use it . I already defined
the host_name in sql server under dynamic filter for merge replication.
I have 50 subscribers and 1 publisher. I use merge replication. The
distributor runs on publisher. The publisher and distributer server name is
creativesoft.How do I set the dynamic filter that every subscriber would get
only his data?
yours truly,
Pramod Renikindi,
creativesoft,
australia
system.dns.gethostname()
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
"pramod" <pramod@.discussions.microsoft.com> wrote in message
news:AE2A49CF-B76F-4719-9D60-984E9FB6D085@.microsoft.com...
> Hi all...
> While setting up my merge replication through the replication wizard in I
> read that the use of HOST_NAME() in the dynamic filter returns the
> Subscriber's Machine Name. How to get host_name() value in .net code can
> anyone give or suggest the code
> how to write to get host_name and where i have to use it . I already
defined
> the host_name in sql server under dynamic filter for merge replication.
> I have 50 subscribers and 1 publisher. I use merge replication. The
> distributor runs on publisher. The publisher and distributer server name
is
> creativesoft.How do I set the dynamic filter that every subscriber would
get
> only his data?
> --
> yours truly,
> Pramod Renikindi,
> creativesoft,
> australia