Friday, March 30, 2012
Merge Replication: transaction log growing too fast
7.0) on a 100MB database with 300 tables. The transaction log size grows to
more than 100MB every hour, even though there are no data changes. Is this
normal?
BTW, I am using 'PUSH to Subscriber' and both Publisher and Subscriber's
transaction log has same issue.
|||Madan,
something very fishy here - can you run profiler to see what is happening
behind the scenes.
Rgds,
Paul Ibison SQL Server MVP, www.replicationanswers.com
(recommended sql server 2000 replication book:
http://www.nwsu.com/0974973602p.html)
|||--from transaction log using log explorer--
Table Insert Delete
Modify
dbo.MSmerge_genhistory 10600 10600 0
dbo.sysmergearticles 0 0
2120
Even thought there were no data changes, MSmerge_genhistory and
sysmergearticles tables were busy doing something.
I also turned off the 'auto update stats' and 'auto create stats', and
results still the same.
|||Paul/Hillary any idea? Please help.
Merge Replication: Missing rows at Subscriber with no conflicts
Hi all,
We are using a mix of SQL 2005 and 2000 servers and our "main" database server is running SQL 2005 x64 (SP2 ver. 3042).
Our system has run perfectly for months, then subsequent to an SP2 update we are seeing several instances where the data record counts are different for several tables among all the servers.
We are using Merge Replication, with no filters and published every 2 minutes.
Any ideas?
TIA,
Michael
I have seen this before with SQL 2000 replication. It not uncommon especially for very high volumn data transfer. Unfortunately I cannot tell you what the issue is or why it happens.
Although I would advise that a 2 minute sync interval is probibly not useful for you at all. You should run the merge agent continuiously with the -continuious flag if you want it to sync this often.
I would change to continuious, reconcile the data then hopefully it doesnt happen again. If you can you would be better moving to an all SQL 2005 scenario.
Martin
sqlMerge Replication: Content of MSmerge_* Tables
I have set up MERGE Replication with NOSYNC option and 14 days subscription
retention period.
My both the servers are in sync with each other since when I started
replication a month back.
But I find there are thousands of records in MSmerge_contents,
MSmerge_tombstone, MSmerge_genhistory.
I want to know how to get rid of all the unwanted entries from the above
tables.
Regards
Javed Iqbal
Javed,
please run sp_mergemetadataretentioncleanup and see if this helps.
Cheers,
Paul Ibison SQL Server MVP, www.replicationanswers.com
(recommended sql server 2000 replication book:
http://www.nwsu.com/0974973602p.html)
|||Hi Paul
Thanks for your reply.
This stored proc is already been running by the merge agent every minute.
Any other option is highly appreciated.
Regards
Javed
"Paul Ibison" <Paul.Ibison@.Pygmalion.Com> wrote in message
news:elzAKGIBGHA.628@.TK2MSFTNGP10.phx.gbl...
> Javed,
> please run sp_mergemetadataretentioncleanup and see if this helps.
> Cheers,
> Paul Ibison SQL Server MVP, www.replicationanswers.com
> (recommended sql server 2000 replication book:
> http://www.nwsu.com/0974973602p.html)
>
|||Also I am getting these types of errors
The merge process could not perform retention-based meta data cleanup in
database 'ABC'.
Regards
Javed
"Paul Ibison" <Paul.Ibison@.Pygmalion.Com> wrote in message
news:elzAKGIBGHA.628@.TK2MSFTNGP10.phx.gbl...
> Javed,
> please run sp_mergemetadataretentioncleanup and see if this helps.
> Cheers,
> Paul Ibison SQL Server MVP, www.replicationanswers.com
> (recommended sql server 2000 replication book:
> http://www.nwsu.com/0974973602p.html)
>
|||Javed,
you could try increasing the merge agent's querytimeout.
Also, you could try reindexing the metadata tables.
If this doesn't help, please enable logging on your merge agent:
http://support.microsoft.com/support.../q312/2/92.asp
and post up the log file.
Cheers,
Paul Ibison SQL Server MVP, www.replicationanswers.com
(recommended sql server 2000 replication book:
http://www.nwsu.com/0974973602p.html)
|||Hi Paul,
Attached is my agent logging file. I still have thousands of records into
those tables.
Thanks in advance
Regards
Javed Iqbal
"Paul Ibison" <Paul.Ibison@.Pygmalion.Com> wrote in message
news:%23SBHyfJBGHA.2708@.TK2MSFTNGP12.phx.gbl...
> Javed,
> you could try increasing the merge agent's querytimeout.
> Also, you could try reindexing the metadata tables.
> If this doesn't help, please enable logging on your merge agent:
> http://support.microsoft.com/support.../q312/2/92.asp
> and post up the log file.
> Cheers,
> Paul Ibison SQL Server MVP, www.replicationanswers.com
> (recommended sql server 2000 replication book:
> http://www.nwsu.com/0974973602p.html)
>
begin 666 Merge_Replication_Verbose_Logging_For_Errors.zip
M4$L#!!0````(`(5CE3-[['W5.0X``*/I`0`P````365R9V5?4F5P;&EC871I
M;VY?5F5R8F]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R9V5?4F5P;&EC871I
M;VY?5F5R8F]S95],;V=G:6YG7T9O<E]%<G)O<G,N='AT4$L%!@.`````!``$`
*7@.```(<.````````
`
end
|||Thanks Javed.
Occasionally you're getting network connectivity errors. When there are no
errors - most of the time - the metadata records are being removed. Apart
form the network errors, it all seems to be working correctly. You have a 14
days subscription
retention period which accounts for these tables not being fully cleaned
up - perhaps you can try reducing this retention period?
Cheers,
Paul Ibison SQL Server MVP, www.replicationanswers.com
(recommended sql server 2000 replication book:
http://www.nwsu.com/0974973602p.html)
|||Thaks Paul for your prompt and through help.
Regards
Javed Iqbal
"Paul Ibison" <Paul.Ibison@.Pygmalion.Com> wrote in message
news:O343DsgBGHA.344@.TK2MSFTNGP11.phx.gbl...
> Thanks Javed.
> Occasionally you're getting network connectivity errors. When there are no
> errors - most of the time - the metadata records are being removed. Apart
> form the network errors, it all seems to be working correctly. You have a
14
> days subscription
> retention period which accounts for these tables not being fully cleaned
> up - perhaps you can try reducing this retention period?
> Cheers,
> Paul Ibison SQL Server MVP, www.replicationanswers.com
> (recommended sql server 2000 replication book:
> http://www.nwsu.com/0974973602p.html)
>
sql
merge replication, what hapens if...
If I'd have to re-replicate everything, can I prevent this by stopping a service or setting a replication schedule instead or something?
Thanks for your help,
Erica <-- not a SQL AdminIt will pick up from where it left of when you shut it down. You may receive some errors in your system log.
Wednesday, March 28, 2012
Merge Replication with MSDE
trying to set up merge replication between the two. When
the merge agent runs on the publisher, it indicates that
the "process could not connect to the Subscriber" (SQL
Server does not exist or access denied).
I'm not sure if matters, but I'm running in a peer-to-
peer network. I have my SQL Agent service on the
publisher running under a local machine account, and that
account has access to the publisher, however I wasn't
sure how to grant access to that account on the
Subscriber, or if that was even necessary.
Any help would be appreciated.
- Jim T.
Jim
I am not positive, but I think that we ran into this problem as well. I
beleive that the problem is that the local machine account on the publisher
(or subscriber) can't authenticate with the other machine which means that
the SQL Server Agent can't connect to the other machine to make replication
happen. If I remember correctly, we had to have a non-local (domain)
account that each domain trusts and each machine allows access to the
database on. I'm not sure, but I think it may also be possible to have
local accounts as long as both the username and password are the same on
both machines. I'm pretty sure that there is a KB article titled somthing
like "How to run replication accross non-trusted domains" that may help. If
you need to change the SQL Agent's service acount, take a look at KB article
283811. Sorry to be so vague, but I hope it points you in the right
direction.
HTH
Ron L
"Jim Toth" <anonymous@.discussions.microsoft.com> wrote in message
news:14b301c4b3e6$5d41a650$a401280a@.phx.gbl...
>I have two MSDE servers on different machines and am
> trying to set up merge replication between the two. When
> the merge agent runs on the publisher, it indicates that
> the "process could not connect to the Subscriber" (SQL
> Server does not exist or access denied).
> I'm not sure if matters, but I'm running in a peer-to-
> peer network. I have my SQL Agent service on the
> publisher running under a local machine account, and that
> account has access to the publisher, however I wasn't
> sure how to grant access to that account on the
> Subscriber, or if that was even necessary.
> Any help would be appreciated.
> - Jim T.
Monday, March 26, 2012
Merge Replication using TCP/IP
We need to setup merge replication between server A & B using TCP/IP. These
servers are behind a firewall. The connection
between these servers can be done only using IP (class C)
How to configure this.
rgds,
Soura
Soura,
You can use web synchronization for merge replication to sync across
firewall. You can find more information here:
http://msdn2.microsoft.com/en-us/library/ms151763.aspx
Yi Chen
"SouRa" <SouRa@.discussions.microsoft.com> wrote in message
news:64ECCDF7-F37F-4AFA-AE7B-9DC575E94363@.microsoft.com...
> Hi,
> We need to setup merge replication between server A & B using TCP/IP.
> These
> servers are behind a firewall. The connection
> between these servers can be done only using IP (class C)
> How to configure this.
> rgds,
> Soura
|||Hi Chen,
Thanks for yor suggestion.
We are using SQL Server 2000 and Web synchronization opiton is available in
SQL 2005. Is there any workaround
for this situation in SQL Server 2000 ?
rgds,
Soura
"Yi Chen [MSFT]" wrote:
> Soura,
> You can use web synchronization for merge replication to sync across
> firewall. You can find more information here:
> http://msdn2.microsoft.com/en-us/library/ms151763.aspx
> Yi Chen
> "SouRa" <SouRa@.discussions.microsoft.com> wrote in message
> news:64ECCDF7-F37F-4AFA-AE7B-9DC575E94363@.microsoft.com...
>
>
Merge replication trouble
I have made a merge replication between two server W2k with sql2000 sp3. Those servers are connected via internet. In distributor (also publisher) I have setting up aliases for both servers. Have generated snapshot but when agent run I have this error: -2
147201019 and 14010 : "the subscription for pubblication [bla bla] is invalid".
I have searching in the net some solutions but I have noticed that in all cases it is depended by alias setting. But I have defined its ?
Some ideas ?
Have solved the puzzle.
In subscription I have noticed with sp_helpserver that the subscription server hav id = 1 so have do this:
sp_dropserver 'DIST_SERVER'
sp_dropserver 'SUB_SERVER'
sp_addserver 'SUB_SERVER', @.local = 'LOCAL'
where DIST_SERVER is my distribution, publisher server and SUB_SERVER is my subscription server.
Bests
|||Rafal,
OK, and the last 2 commands will require a restart of the services.
I'm not clear what the first line is for though (sp_dropserver 'DIST_SERVER').
Regards,
Paul Ibison
Merge Replication to multiple servers losing data
We are using merge replication between four servers (1 publisher & 3
subscribers). The same articles (tables) are in each publication. I run the
application which changes data in some tables and adds records in another
table. The inserted data is immediately updated via trigger. After running
the application all expected data is present. If I manually force
replication to each subscriber sequentially, all expected data is present.
If I run replication between the servers at the same time, the table to
which data was added will lose some data. The data lost was not the data
that was just added. We are running SQL Server 2000 SP3a on all servers. Any
ideas?
tia,
Paul
Look at the 'view conflict' at replication monitor...
"PaulW" <MSNewsGroup@.Digi-Sol.com>
news:urv9zNxlHHA.1216@.TK2MSFTNGP03.phx.gbl...
> Hi,
> We are using merge replication between four servers (1 publisher & 3
> subscribers). The same articles (tables) are in each publication. I run
> the application which changes data in some tables and adds records in
> another table. The inserted data is immediately updated via trigger.
> After running the application all expected data is present. If I manually
> force replication to each subscriber sequentially, all expected data is
> present. If I run replication between the servers at the same time, the
> table to which data was added will lose some data. The data lost was not
> the data that was just added. We are running SQL Server 2000 SP3a on all
> servers. Any ideas?
> tia,
> Paul
>
|||There are no recorded conflicts. This table only has data inserted, then
updated through a trigger. We did view the transaction log. The only entries
with the table were the inserts we initiated followed by a delete/insert for
the trigger update.
Paul
"Grigoris Tsolakidis" <gcholakidis@.spam_remove.hotmail.com> wrote in message
news:uhRQsHGmHHA.4852@.TK2MSFTNGP03.phx.gbl...
> Look at the 'view conflict' at replication monitor...
> "PaulW" <MSNewsGroup@.Digi-Sol.com>
> news:urv9zNxlHHA.1216@.TK2MSFTNGP03.phx.gbl...
>
sql
Friday, March 23, 2012
Merge replication stopping
I have selected merge replication because both servers are constantly
updating information. We have continuous merge replication (push) and
everything works pretty good.
The problem is in some occassions the job stops saying that it can not
enumerate the changes on the subscriber, if I restart it works fine. This is
causing more than a headache because we always have to be watching if
replication is working. I try to change the job to restart when it fails but
it doesn't work.
I have one publisher with the distributor on the same machine pushing the
continuous merge to one subscriber.
Can this happen because the subscriber is busy and the job can connect? Have
anyone seen this happening?
Thanks a lot
Yes, it is typically a transitory error. Many dba's run their merge agents
in infinite loops by having step 3 looping back to step 1.
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
"Salvador" <Salvador@.discussions.microsoft.com> wrote in message
news:723F7F3D-6BE0-4205-B79F-01CA227E7EF7@.microsoft.com...
> Hi All,
> I have selected merge replication because both servers are constantly
> updating information. We have continuous merge replication (push) and
> everything works pretty good.
> The problem is in some occassions the job stops saying that it can not
> enumerate the changes on the subscriber, if I restart it works fine. This
is
> causing more than a headache because we always have to be watching if
> replication is working. I try to change the job to restart when it fails
but
> it doesn't work.
> I have one publisher with the distributor on the same machine pushing the
> continuous merge to one subscriber.
> Can this happen because the subscriber is busy and the job can connect?
Have
> anyone seen this happening?
> Thanks a lot
|||We have the job running every minute and it seems to work fine. I have
noticed that the retry doesn't work like one would think it should.
If you go to Merge Agent History, Session Details, Error Details, you should
get more information on why it can't continue. We get a lot of deadlocks
causing the agent to fail, but when it picks back up a minute later it
usually works fine.
Dylan Peters
"Hilary Cotter" wrote:
> Yes, it is typically a transitory error. Many dba's run their merge agents
> in infinite loops by having step 3 looping back to step 1.
> --
> 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
> "Salvador" <Salvador@.discussions.microsoft.com> wrote in message
> news:723F7F3D-6BE0-4205-B79F-01CA227E7EF7@.microsoft.com...
> is
> but
> Have
>
>
sql
Merge replication set-up problem
Hi All,
I'm trying to set up merge replication between two servers, and can create the snapshot without any issues, however, when I try to get a subscriber to pick up the snapshot, I get the following error
Command attempted:
{call sp_MSsetconflicttable (N'ADDRESS', N'MSmerge_conflict_HK2SH_ADDRESS', N'PYRITE', N'ProlawV11', N'HK2SH')}
Error messages:
Incorrect syntax near 'ADDRESS'. (Source: MSSQLServer, Error number: 102)
Get help: http://help/102
The merge process was unable to deliver the snapshot to the Subscriber. If using Web synchronization, the merge process may have been unable to create or write to the message file. When troubleshooting, restart the synchronization with verbose history logging and specify an output file to which to write. (Source: MSSQL_REPL, Error number: MSSQL_REPL-2147201001)
Get help: http://help/MSSQL_REPL-2147201001
I've had a look at various forums, but the only thing I could find was in russian and it wasn't especially clear. None of the MS links help and I've tried searching the MS site. Before I log a call with them, has anyone any ideas how to get round this?
Thanks
Dave
Also can you confirm that your publisher is Pyrite, your publication database is ProlawV11, and publication name is HK2SH?|||
Schema for Address table
CREATE TABLE [dbo].[ADDRESS](
[ADDRESS] [varchar](36) COLLATE SQL_Latin1_General_CP1_CI_AS NOT NULL,
[CITY] [varchar](30) COLLATE SQL_Latin1_General_CP1_CI_AS NULL,
[STATE] [varchar](30) COLLATE SQL_Latin1_General_CP1_CI_AS NULL,
[ZIP] [varchar](30) COLLATE SQL_Latin1_General_CP1_CI_AS NULL,
[COUNTRY] [varchar](30) COLLATE SQL_Latin1_General_CP1_CI_AS NULL,
[Contacts] [varchar](36) COLLATE SQL_Latin1_General_CP1_CI_AS NULL,
[AddressType] [varchar](40) COLLATE SQL_Latin1_General_CP1_CI_AS NULL,
[addrlines] [text] COLLATE SQL_Latin1_General_CP1_CI_AS NULL,
[IsMailing] [varchar](1) COLLATE SQL_Latin1_General_CP1_CI_AS NULL DEFAULT ('N'),
[rowguid] [uniqueidentifier] ROWGUIDCOL NOT NULL CONSTRAINT [MSmerge_df_rowguid_4DDB619441DB4A7889BBCE245C68FF1C] DEFAULT (newsequentialid()),
CONSTRAINT [PK__ADDRESS__7D439ABD] PRIMARY KEY CLUSTERED
(
[ADDRESS] ASC
)WITH (IGNORE_DUP_KEY = OFF) ON [PRIMARY]
) ON [PRIMARY] TEXTIMAGE_ON [PRIMARY]
And you're correct in your assumptions about the publisher/tables/name/etc
Thanks
Dave
Merge replication set-up problem
Hi All,
I'm trying to set up merge replication between two servers, and can create the snapshot without any issues, however, when I try to get a subscriber to pick up the snapshot, I get the following error
Command attempted:
{call sp_MSsetconflicttable (N'ADDRESS', N'MSmerge_conflict_HK2SH_ADDRESS', N'PYRITE', N'ProlawV11', N'HK2SH')}
Error messages:
Incorrect syntax near 'ADDRESS'. (Source: MSSQLServer, Error number: 102)
Get help: http://help/102
The merge process was unable to deliver the snapshot to the Subscriber. If using Web synchronization, the merge process may have been unable to create or write to the message file. When troubleshooting, restart the synchronization with verbose history logging and specify an output file to which to write. (Source: MSSQL_REPL, Error number: MSSQL_REPL-2147201001)
Get help: http://help/MSSQL_REPL-2147201001
I've had a look at various forums, but the only thing I could find was in russian and it wasn't especially clear. None of the MS links help and I've tried searching the MS site. Before I log a call with them, has anyone any ideas how to get round this?
Thanks
Dave
Also can you confirm that your publisher is Pyrite, your publication database is ProlawV11, and publication name is HK2SH?|||
Schema for Address table
CREATETABLE [dbo].[ADDRESS](
[ADDRESS] [varchar](36)COLLATE SQL_Latin1_General_CP1_CI_AS NOTNULL,
[CITY] [varchar](30)COLLATE SQL_Latin1_General_CP1_CI_AS NULL,
[STATE] [varchar](30)COLLATE SQL_Latin1_General_CP1_CI_AS NULL,
[ZIP] [varchar](30)COLLATE SQL_Latin1_General_CP1_CI_AS NULL,
[COUNTRY] [varchar](30)COLLATE SQL_Latin1_General_CP1_CI_AS NULL,
[Contacts] [varchar](36)COLLATE SQL_Latin1_General_CP1_CI_AS NULL,
[AddressType] [varchar](40)COLLATE SQL_Latin1_General_CP1_CI_AS NULL,
[addrlines] [text] COLLATE SQL_Latin1_General_CP1_CI_AS NULL,
[IsMailing] [varchar](1)COLLATE SQL_Latin1_General_CP1_CI_AS NULLDEFAULT('N'),
[rowguid] [uniqueidentifier] ROWGUIDCOLNOTNULLCONSTRAINT [MSmerge_df_rowguid_4DDB619441DB4A7889BBCE245C68FF1C] DEFAULT(newsequentialid()),
CONSTRAINT [PK__ADDRESS__7D439ABD] PRIMARYKEYCLUSTERED
(
[ADDRESS] ASC
)WITH(IGNORE_DUP_KEY =OFF)ON [PRIMARY]
)ON [PRIMARY] TEXTIMAGE_ON [PRIMARY]
And you're correct in your assumptions about the publisher/tables/name/etc
Thanks
Dave
Merge Replication Schema Changes
environment, merge replicated with other lab servers, a production
environment, merge replicated with other production servers, and a
development environment not replicated anywhere. We do not want day-to-day
development (schema and data changes) to effect either the lab or production
environments, however periodically would like to take these changes and apply
them to the lab environment. Unfortunately, all tools that we have used to
copy these schema changes from development to lab fail since replication is
not configured in the development environment (and therefore schema migration
fails due to the lack of row guids and/or default value differences). How
can we easily and routinely (but manually) package schema changes from a
non-replicated database and push them into a replicated database, without
breaking replication itself? Once the schema is migrated, moving data seems
trivial.
It seems that your problem is due to the guids and related metadata not
being present in the dev environment. I think the best way to do this would
be to either merge publisher the dev environment, or to add the guid columns
with the unique indexes on each table you are replicating like this:
alter table MyTable
add [rowguid] [uniqueidentifier] ROWGUIDCOL
NOT NULL
CONSTRAINT [MSmerge_df_rowguid_MyTable] DEFAULT (newid())
Hilary Cotter
Director of Text Mining and Database Strategy
RelevantNOISE.Com - Dedicated to mining blogs for business intelligence.
This posting is my own and doesn't necessarily represent RelevantNoise's
positions, strategies or opinions.
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
"Zer0Day" <Zer0Day@.discussions.microsoft.com> wrote in message
news:2B2E7210-1416-482D-AC33-31DD7CEA1A67@.microsoft.com...
> We have three distinct environments that a databse resides in: a lab
> environment, merge replicated with other lab servers, a production
> environment, merge replicated with other production servers, and a
> development environment not replicated anywhere. We do not want
> day-to-day
> development (schema and data changes) to effect either the lab or
> production
> environments, however periodically would like to take these changes and
> apply
> them to the lab environment. Unfortunately, all tools that we have used
> to
> copy these schema changes from development to lab fail since replication
> is
> not configured in the development environment (and therefore schema
> migration
> fails due to the lack of row guids and/or default value differences). How
> can we easily and routinely (but manually) package schema changes from a
> non-replicated database and push them into a replicated database, without
> breaking replication itself? Once the schema is migrated, moving data
> seems
> trivial.
Merge Replication Recovery
Had merge replication set up between two servers. with push subscription.
For various reasons the replication stopped running for a few days and now
we have different data at both sites.
Does anybody have a series of steps to get this back up and running other
than the following.
1. Create new db at subscriber.
2. Publish to this new sunscriber from existing publication.
3. Piece in missing data from offline subscriber.(data inserted at
subscriber since merge stopped).
Any other suggestions?
You should be able to synchronize to get things back up, provided you
haven't exceeded the retention period - the publication retention value is
used to determine when subscriptions that have not synchronized within the
retention period should expire and it is set to 14 days by default. If this
is not an option, then I'd use Redgate'd DataCompare to generate the change
script to be applied at the publisher then reinitialize the subscriber.
Rgds,
Paul Ibison SQL Server MVP, www.replicationanswers.com/default.asp
(recommended sql server 2000 replication book:
http://www.nwsu.com/0974973602p.html)
|||run a validation to determine how out of sync you are. Run the merge agent
until it completes. Chances are you will be in sync after it runs.
The problem with trying to enter the data manually or through applets like
DataCompare is that when you enter this data on the subscriber to try to
sync it
it will raise all sorts of conflicts when you run the merge agent, and
they will be kicked back and you will be returned the state you where in
before.
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
|||Fair point, but I was recommending using the RedGate change script at the
publisher and subsequently reinitializing the subscriber. It's not very
sophisticated and the data size might make it unattractive, but it should
work.
Rgds,
Paul
"Hilary Cotter" <hilary.cotter@.gmail.com> wrote in message
news:opso0n92xurj9kur@.hcottter-lap.ap.org...
> run a validation to determine how out of sync you are. Run the merge agent
> until it completes. Chances are you will be in sync after it runs.
> The problem with trying to enter the data manually or through applets like
> DataCompare is that when you enter this data on the subscriber to try to
> sync it
> it will raise all sorts of conflicts when you run the merge agent, and
> they will be kicked back and you will be returned the state you where in
> before.
> --
> 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
|||Thanks for all the suggestions guys. The replicationanswers website is very
informative. Just a quick question Hilary you mentioned run a validation,
what exactly did you mean by that? write my own routine.
Just for info we did get the snapshot reapplied to the subscription but the
data changes at the subscriber did not get applied, despite being well
within the retention period so we had to maunally rebuild the data.
"Paul Ibison" <Paul.Ibison@.Pygmalion.Com> wrote in message
news:eh4LsOdPFHA.2748@.TK2MSFTNGP09.phx.gbl...
> Fair point, but I was recommending using the RedGate change script at the
> publisher and subsequently reinitializing the subscriber. It's not very
> sophisticated and the data size might make it unattractive, but it should
> work.
> Rgds,
> Paul
>
> "Hilary Cotter" <hilary.cotter@.gmail.com> wrote in message
> news:opso0n92xurj9kur@.hcottter-lap.ap.org...
>
|||if your subscription is a global subscription you should be able to
synchronize!
MB wrote:
> Thanks for all the suggestions guys. The replicationanswers website
is very
> informative. Just a quick question Hilary you mentioned run a
validation,
> what exactly did you mean by that? write my own routine.
> Just for info we did get the snapshot reapplied to the subscription
but the
> data changes at the subscriber did not get applied, despite being
well[vbcol=seagreen]
> within the retention period so we had to maunally rebuild the data.
>
> "Paul Ibison" <Paul.Ibison@.Pygmalion.Com> wrote in message
> news:eh4LsOdPFHA.2748@.TK2MSFTNGP09.phx.gbl...
at the[vbcol=seagreen]
very[vbcol=seagreen]
should[vbcol=seagreen]
merge[vbcol=seagreen]
runs.[vbcol=seagreen]
applets[vbcol=seagreen]
subscriber to[vbcol=seagreen]
and[vbcol=seagreen]
where in[vbcol=seagreen]
Wednesday, March 21, 2012
Merge Replication Problems
I have a problem by using GPRS in a merge replication.
I have an SQL Servers with 4 publications, these publication have horizontal
filtering, and they have about 20 Articles each of them. I need the
horizontal filtering because the client databases (client laptops use MSDE)
only needs to have the required data.
If I run the replication by using the office network, all of then works
fine. But my problem is by running the replication using GPRS. I have lot of
problems because the connection is broken although there isn't data to be
merged.
Thanks in advance
If the network error is a problem causing the merge agent to fail, then you
can force it to restart: the last step in the merge job should be to return
to step one if it fails.
Rgds,
Paul Ibison SQL Server MVP, www.replicationanswers.com
(recommended sql server 2000 replication book:
http://www.nwsu.com/0974973602p.html)
|||Hi Paul,
Automatically is retrying the agent execution, Exactly the error is "General
network error", it seems the connection with distributor is broken when there
is data to be downloaded.
There is any guide to optimize correctly a publication.
I also have change the replication schema, I have configurated an
intermediate database to obtain the required data by a client, and after i
have configurated this database as publiser to send the data to the client
without filters, but when I try to send this data to the client the
replication log says "there isn't data to be downloaded". It is possible to
configure this topology? or it is an erroneus design?
Topology:
ServerDB (publisher) --> Inter.DB (Subscriber/Publisher) --> clientDB
(Subscriber)
Thanks.
|||Please, could anybody help me?
Thanks
|||For the unreliable agent, apart from creating the loop I
referred to earlier, you could change the merge agent's
profile properties to
optimize for an unreliable link - eg reduce
the '...GenerationsPerBatch'
counters.
For the topology, this is vaible and is referred to as
republishing. If you're having issues with it, then
perhaps go down the alternative synchronization partners
route.
Rgds,
Paul Ibison SQL Server MVP, www.replicationanswers.com
(recommended sql server 2000 replication book:
http://www.nwsu.com/0974973602p.html)
|||I have tried to configured the new topology:
ServerDB (publisher) --> Inter.DB (Subscriber/Publisher) --> clientDB
(Subscriber)
But always after I execute the subscription at ClientDB, it says "no data to
be merged", but i have modified data in the Serverdb that has been merged to
the InterDB. I don't understand why. Any idea?
Thanks.
|||OK - I just set this up in the office and it worked fine.
Perhaps you have been put off by the message 'No data
needed to be merged'? This message is the last one to be
recorded and is displayed even when the data has indeed
been merged. Please right-click the merge agent for the
clientDB subscription and examine its history to
determine if the changes really went over.
Rgds,
Paul Ibison SQL Server MVP, www.replicationanswers.com
(recommended sql server 2000 replication book:
http://www.nwsu.com/0974973602p.html)
|||I have checked the job history, but no data has been trasfered. I have open
tables, but there isn't data.
|||Please can you script it out - the table schema and the 2
publications and subscribers and post it up and I'll take
a look some time tomorrow.
Rgds,
Paul Ibison
|||Table:
CREATE TABLE [dbo].[MST_MANDANTE] (
[ID_CODMANDANTE] [varchar] (3) COLLATE Modern_Spanish_CI_AS NOT NULL ,
[TXT_DESCRIPCION] [varchar] (20) COLLATE Modern_Spanish_CI_AS NULL ,
[ID_CONTROL] uniqueidentifier ROWGUIDCOL NOT NULL
) ON [PRIMARY]
GO
Publication ServerDB:
-- Enabling the replication database
use master
GO
exec sp_replicationdboption @.dbname = N'SFAservidor', @.optname = N'merge
publish', @.value = N'true'
GO
use [SFAservidor]
GO
-- Adding the merge publication
exec sp_addmergepublication @.publication = N'SFAservidorMandante',
@.description = N'Merge publication of SFAservidor database from Publisher
PCSAC02.', @.retention = 14, @.sync_mode = N'native', @.allow_push = N'true',
@.allow_pull = N'true', @.allow_anonymous = N'false', @.enabled_for_internet =
N'false', @.centralized_conflicts = N'true', @.dynamic_filters = N'false',
@.snapshot_in_defaultfolder = N'false', @.alt_snapshot_folder = N'd:\snapshot',
@.compress_snapshot = N'false', @.ftp_port = 21, @.ftp_login = N'anonymous',
@.conflict_retention = 14, @.keep_partition_changes = N'false',
@.allow_subscription_copy = N'false', @.allow_synctoalternate = N'false',
@.add_to_active_directory = N'false', @.max_concurrent_merge = 0,
@.max_concurrent_dynamic_snapshots = 0
exec sp_addpublication_snapshot @.publication =
N'SFAservidorMandante',@.frequency_type = 4, @.frequency_interval = 1,
@.frequency_relative_interval = 1, @.frequency_recurrence_factor = 0,
@.frequency_subday = 1, @.frequency_subday_interval = 5, @.active_start_date =
0, @.active_end_date = 0, @.active_start_time_of_day = 500,
@.active_end_time_of_day = 235959, @.snapshot_job_name =
N'PCSAC02-SFAservidor-SFAservidorMandante-21'
GO
exec sp_grant_publication_access @.publication = N'SFAservidorMandante',
@.login = N'BUILTIN\Administradores'
GO
exec sp_grant_publication_access @.publication = N'SFAservidorMandante',
@.login = N'distributor_admin'
GO
exec sp_grant_publication_access @.publication = N'SFAservidorMandante',
@.login = N'sa'
GO
-- Adding the merge articles
exec sp_addmergearticle @.publication = N'SFAservidorMandante', @.article =
N'MST_MANDANTE', @.source_owner = N'dbo', @.source_object = N'MST_MANDANTE',
@.type = N'table', @.description = null, @.column_tracking = N'true',
@.pre_creation_cmd = N'drop', @.creation_script = null, @.schema_option =
0x000000000000CFF1, @.article_resolver = null, @.subset_filterclause = null,
@.vertical_partition = N'false', @.destination_owner = N'dbo',
@.auto_identity_range = N'false', @.verify_resolver_signature = 0,
@.allow_interactive_resolver = N'false', @.fast_multicol_updateproc = N'true',
@.check_permissions = 0
GO
Publication InterDB:
-- Enabling the replication database
use master
GO
exec sp_replicationdboption @.dbname = N'SFAInt', @.optname = N'merge
publish', @.value = N'true'
GO
use [SFAInt]
GO
-- Adding the merge publication
exec sp_addmergepublication @.publication = N'SFAIntMandante', @.description =
N'Merge publication of SFAInt database from Publisher PCSAC02.', @.retention =
14, @.sync_mode = N'native', @.allow_push = N'true', @.allow_pull = N'true',
@.allow_anonymous = N'false', @.enabled_for_internet = N'false',
@.centralized_conflicts = N'true', @.dynamic_filters = N'false',
@.snapshot_in_defaultfolder = N'false', @.alt_snapshot_folder = N'd:\snapshot',
@.compress_snapshot = N'false', @.ftp_port = 21, @.ftp_login = N'anonymous',
@.conflict_retention = 14, @.keep_partition_changes = N'false',
@.allow_subscription_copy = N'false', @.allow_synctoalternate = N'false',
@.add_to_active_directory = N'false', @.max_concurrent_merge = 0,
@.max_concurrent_dynamic_snapshots = 0
exec sp_addpublication_snapshot @.publication =
N'SFAIntMandante',@.frequency_type = 8, @.frequency_interval = 64,
@.frequency_relative_interval = 0, @.frequency_recurrence_factor = 1,
@.frequency_subday = 1, @.frequency_subday_interval = 0, @.active_start_date =
0, @.active_end_date = 0, @.active_start_time_of_day = 5000,
@.active_end_time_of_day = 0, @.snapshot_job_name =
N'PCSAC02-SFAInt-SFAIntMandante-27'
GO
exec sp_grant_publication_access @.publication = N'SFAIntMandante', @.login =
N'BUILTIN\Administradores'
GO
exec sp_grant_publication_access @.publication = N'SFAIntMandante', @.login =
N'distributor_admin'
GO
exec sp_grant_publication_access @.publication = N'SFAIntMandante', @.login =
N'sa'
GO
-- Adding the merge articles
exec sp_addmergearticle @.publication = N'SFAIntMandante', @.article =
N'MST_MANDANTE', @.source_owner = N'dbo', @.source_object = N'MST_MANDANTE',
@.type = N'table', @.description = null, @.column_tracking = N'true',
@.pre_creation_cmd = N'drop', @.creation_script = null, @.schema_option =
0x000000000000CFF1, @.article_resolver = null, @.subset_filterclause = null,
@.vertical_partition = N'false', @.destination_owner = N'dbo',
@.auto_identity_range = N'false', @.verify_resolver_signature = 0,
@.allow_interactive_resolver = N'false', @.fast_multicol_updateproc = N'true',
@.check_permissions = 0
GO
Subscription InterDB:
-- Adding the merge pull subscription: PCSAC02:SFAservidor:SFAservidorMandante
/****** Begin: Script to be run at Subscriber: PCSAC02 ******/
use [SFAInt]
GO
exec sp_addmergepullsubscription @.publication = N'SFAservidorMandante',
@.publisher = N'PCSAC02', @.publisher_db = N'SFAservidor', @.subscriber_type =
N'global', @.subscription_priority = 75.000000, @.sync_type = N'none',
@.description = N'Merge publication of SFAservidor database from Publisher
PCSAC02.'
exec sp_addmergepullsubscription_agent @.publisher = N'PCSAC02',
@.publisher_db = N'SFAservidor', @.publication = N'SFAservidorMandante',
@.distributor = N'PCSAC02', @.subscriber_security_mode = 1,
@.publisher_security_mode = 1, @.distributor_security_mode = 1, @.frequency_type
= 4, @.frequency_interval = 1, @.frequency_relative_interval = 1,
@.frequency_recurrence_factor = 0, @.frequency_subday = 8,
@.frequency_subday_interval = 1, @.active_start_date = 0, @.active_end_date = 0,
@.active_start_time_of_day = 0, @.active_end_time_of_day = 235959,
@.enabled_for_syncmgr = N'true', @.alt_snapshot_folder = N'\\pcsac02\snapshot',
@.use_ftp = N'false', @.use_interactive_resolver = N'false', @.offloadagent =
N'false'
GO
/****** End: Script to be run at Subscriber: PCSAC02 ******/
/****** Begin: Script to be run at Publisher: PCSAC02 ******/
use [SFAservidor]
GO
exec sp_addmergesubscription @.publication = N'SFAservidorMandante',
@.subscriber = N'PCSAC02', @.subscriber_db = N'SFAInt', @.subscription_type =
N'pull', @.subscriber_type = N'global', @.subscription_priority = 75.000000,
@.sync_type = N'none'
GO
/****** End: Script to be run at Publisher: PCSAC02 ******/
Subscription ClienDB:
-- Adding the merge pull subscription: PCSAC02:SFAInt:SFAIntMandante
/****** Begin: Script to be run at Subscriber: PCSAC02 ******/
use [sfacliente]
GO
exec sp_addmergepullsubscription @.publication = N'SFAIntMandante',
@.publisher = N'PCSAC02', @.publisher_db = N'SFAInt', @.subscriber_type =
N'local', @.subscription_priority = 0.000000, @.sync_type = N'none',
@.description = N'Merge publication of SFAInt database from Publisher PCSAC02.'
exec sp_addmergepullsubscription_agent @.publisher = N'PCSAC02',
@.publisher_db = N'SFAInt', @.publication = N'SFAIntMandante', @.distributor =
N'PCSAC02', @.subscriber_security_mode = 1, @.publisher_security_mode = 1,
@.distributor_security_mode = 1, @.frequency_type = 4, @.frequency_interval = 1,
@.frequency_relative_interval = 1, @.frequency_recurrence_factor = 0,
@.frequency_subday = 8, @.frequency_subday_interval = 1, @.active_start_date =
0, @.active_end_date = 0, @.active_start_time_of_day = 0,
@.active_end_time_of_day = 235959, @.enabled_for_syncmgr = N'true',
@.alt_snapshot_folder = N'\\pcsac02\snapshot', @.use_ftp = N'false',
@.use_interactive_resolver = N'false', @.offloadagent = N'false'
GO
/****** End: Script to be run at Subscriber: PCSAC02 ******/
/****** Begin: Script to be run at Publisher: PCSAC02 ******/
use [SFAInt]
GO
exec sp_addmergesubscription @.publication = N'SFAIntMandante', @.subscriber =
N'PCSAC02', @.subscriber_db = N'sfacliente', @.subscription_type = N'pull',
@.subscriber_type = N'local', @.subscription_priority = 0.000000, @.sync_type =
N'none'
GO
/****** End: Script to be run at Publisher: PCSAC02 ******/
Merge Replication Problem with separate Publisher/Distributor
publication and distribution. The servers are in the same domain. The same
domain account is used oon all servers involved with the replication. The
setup scripts perform the following task:
Distributor (Master db)
sp_AddDistributor
sp_MSupdateAgentType_default @.profile_id = 1
sp_MSupdateAgentType_default @.profile_id = 2
sp_MSupdateAgentType_default @.profile_id = 4
sp_MSupdateAgentType_default @.profile_id = 6
sp_MSupdateAgentType_default @.profile_id = 11
sp_AddDistributionDB
jobs: Agent History Cleanup
DistributionDB Cleanup
Sp_AddDistPublisher @.SecurityMode = 1
@.Trusted = N'False'
@.ThirdParty_flag = 0
do you have a remote distributor?
If not it sounds like your replication setup is not configured correctly.
Remove replication (follow the menu items to disable publishing) and
reinstall it.
"PaulW" <MSNewsGroup@.Digi-Sol.com> wrote in message
news:%23r2otLqMEHA.2064@.TK2MSFTNGP12.phx.gbl...
> We are trying to setup merge replication using separate servers for the
> publication and distribution. The servers are in the same domain. The same
> domain account is used oon all servers involved with the replication. The
> setup scripts perform the following task:
>
> Distributor (Master db)
>
> sp_AddDistributor
>
> sp_MSupdateAgentType_default @.profile_id = 1
> sp_MSupdateAgentType_default @.profile_id = 2
> sp_MSupdateAgentType_default @.profile_id = 4
> sp_MSupdateAgentType_default @.profile_id = 6
> sp_MSupdateAgentType_default @.profile_id = 11
>
> sp_AddDistributionDB
>
> jobs: Agent History Cleanup
> DistributionDB Cleanup
>
> Sp_AddDistPublisher @.SecurityMode = 1
> @.Trusted =
N'False'
> @.ThirdParty_flag = 0
> .
>
> Jobs: Expired Subscription Cleanup
> Reinitialize subscription having data validation failures
> Replication agent Checkup
> SnapShot
>
>
> Publisher (Master db)
>
> Jobs: Reinitialize subscription having data validation failures
> Replication agent Checkup
>
> sp_AddSubscriber
>
> Server: Msg 14071 Procedure sp_AddSubscriber, line 129 Could not find the
> Distributor or the distribution database for the local server. The
> Distributor may not be installed, or the local server may not be
configured
> as a Publisher at the Distributor
>
>
> E.M. on the distributor list the publisher with out any publications. Line
> 129 of sp_AddSubscriber is sp_HelpDistributor which according to the help
is
> to run only on the distributor, explaining the error. Sp_AddSubscriber is
> supposed to be run on the publisher.
>
> What am I missing?
>
>
> tia
> Paul
>
>
|||We are using a remote distributor. We did not set a password in
sp_adddistributor. In sp_adddistpublisher we tried both trusted and not
trusted. The authentication on all servers is set to Windows only. I noticed
that the distributor_admin account is a SQL Server account. Can this be the
problem? If so, is there a way to get this to run using Windows only?
Paul
"Hilary Cotter" <hilaryk@.att.net> wrote in message
news:ujpd7bxMEHA.2484@.TK2MSFTNGP09.phx.gbl...[vbcol=seagreen]
> do you have a remote distributor?
> If not it sounds like your replication setup is not configured correctly.
> Remove replication (follow the menu items to disable publishing) and
> reinstall it.
> "PaulW" <MSNewsGroup@.Digi-Sol.com> wrote in message
> news:%23r2otLqMEHA.2064@.TK2MSFTNGP12.phx.gbl...
same[vbcol=seagreen]
The[vbcol=seagreen]
> N'False'
the[vbcol=seagreen]
> configured
Line[vbcol=seagreen]
help[vbcol=seagreen]
> is
is
>
|||We tried to setup merge replication using the remote distributor through
E.M. and it worked. Then we used the option to generate SQL scripts. When we
ran the scripts, errors were generated. One of the errors was, in one job
only; the server name was used for the server name and the distributor
database name. They were not the same name.
We did find out that the distributor must be using SQL and Windows
authentication. That option along did not get our scripts working. There
must be something subtle that I am missing.
Paul
"PaulW" <MSNewsGroup@.Digi-Sol.com> wrote in message
news:#7OrH#3MEHA.1644@.TK2MSFTNGP09.phx.gbl...
> We are using a remote distributor. We did not set a password in
> sp_adddistributor. In sp_adddistpublisher we tried both trusted and not
> trusted. The authentication on all servers is set to Windows only. I
noticed
> that the distributor_admin account is a SQL Server account. Can this be
the[vbcol=seagreen]
> problem? If so, is there a way to get this to run using Windows only?
>
> Paul
>
> "Hilary Cotter" <hilaryk@.att.net> wrote in message
> news:ujpd7bxMEHA.2484@.TK2MSFTNGP09.phx.gbl...
correctly.[vbcol=seagreen]
the
> same
> The
> the
> Line
> help
> is
>
|||I believe this is because you don't have the addDistributor S.P. being run
on the publisher as well as the distributor. ;)
Merge replication problem MSDE
Failed to insert detail rows in master-detail scenario during merge replication. Not always, sometimes.
Topology:
I've got 5 servers running MSDE, one of them is central publisher/distributor for merge type of replication.
There is no row or column filtering: all subscribers have all data. Central publisher resolve conflicts with default revolvers.
Some tables have relations: master-detail (i.e. orders-ordersDetails, etc). Relations are defined in tables as FK.
My application which fills data use datasets with relations between tables defined the same way as in the sqlserver. So app first work with dataset which is unable to receive details without master record. When data updated to msde, it is done without errors, means master and details table updated correctly (tables at msde has relations too)
Applications running on 4 different locations and fill data to local db (subscriber to central publisher).
Sync occurs every 15 minutes in the following order (merge agents run at publisher/distributor):
subscriber1: every 15 minutes, starts at 00.00h
subscriber2: every 15 minutes, starts at 00.03h
subscriber3: every 15 minutes, starts at 00.06h
subscriber4: every 15 minutes, starts at 00.09h
Sync lasts for average 15 sec, never 3 min.
Problem details:
Message:
The row was inserted at 'CentPub.myDB' but could not be inserted at 'Sub2.MyDB'. INSERT statement conflicted
with COLUMN FOREIGN KEY constraint 'FK_OrdersDetails_Orders'. The conflict occurred in database 'MyDB',
table 'Orders', column 'OrderID'.
Description
CentPub is central publisher which just collecting data from subscribers. So, Order was made on one of the other subscribers different than Sub2, mean user at location3 insert order with details in local database, after a while, CentPub take this order to its database (MyDB), after that CentPub try to sync with some of the other subscribers (i.e. Sub2 == location2) and then for some unknown reason orderDeatils failed to insert in Sub2's orderDeatil table because constraint 'FK_OrdersDetails_Orders' conflict.
After that happened, thing goes like in http://support.microsoft.com/kb/307482 (generally: in next session, failed order details are deleted
from CentPub, which means deleted from all subscribers after syncs.)
The problem is that subscribers have tables with relations, so Cause isn't as describe in MS kb because my tables have relations at all servers.
After finished replications I have Orders without details records at all subscribers, so I assume that merge agents sometimes (not always) try to insert details prior to master table during the same sync session.
In resolution section of MS kb article they say 'Mark the subscriber foreign key constraints as NOT FOR REPLICATION'.
In relations definition I see 'Enforce relationship for replication) options which is enabled in my tables.
If I turn that option off, is it possible to happen that my subscribers receive details without master record? (My observation of behavior says that will not happen(that will lead to problems in my app because my datasets enforce relations too).
Deleted record I bring back to life with conflict manager in EM, but I'd like it never happen.
Is it a bug, side effect or something I do it the wrong way?
Thanks and regardsThe answer is no. When you change your constraints into "NOT FOR REPLICATION" the merge agent is the only process that will ignore the constraint as it propagates the changes amongst the subscribers. The point at which the data is entered into the tables (whether it be front-end app, sproc, etc.) will still enforce the FK constraints.|||Thanks.
I'll try to remove that option.
Anyway, what is the purpose of this option if merge agents don't care about tables with relations?
It is very strange in my situation because I'm sure that my data is in correct form (master-detail) in every point in time (first master, than details) so I don't expect problems during replication.|||Merge agents do care unless you tell them not to. In previous dealings with M$oft, it appears to be related to the number of transactions and the generations associated with them. The merge agent can be set to transmit up to 2000 generations, but will sometines still split up the parent and child transactions, especially in a heavy OLTP database.
Here is link: http://support.microsoft.com/kb/307356/en-us|||Thanks tomh53.
I'll try to increase generations to 2000 and mark not for replication (it should be enough to avoid the problem)
Regards
g.|||I've tested with max value for generations parameter (2000) and everything work fine.
Thanks and regares
G.
Merge Replication Problem (Private,Public Data - Security Issue)
We plan to establish a merge replication topology in which several servers
(subscribers) have "public" data – data that have to be propagated to the
other servers, and private data - data reside only at original servers.
Private and public data are marked with one table column (1/0). Those servers
are at local branches in different countries. We have one server on the
Internet, which can be publisher and hold all public data, besides its own
private data. Subscriptions will be anonymous pull subscriptions. Subscribers
would periodicaly make dialup connections and merge data. Article filter
would be something like "Public=1". The problem is that subscribers' private
data will go to the publisher in merge replication. As far as we understand,
filter is only checked at the publisher and not at the subscriber. Only
public data goes from publisher to the subscribers, but all data goes from
subscriber to the publisher.
Our client is to happy about the fact that data marked as private is
available on the Internet server.
Is there any possibility to prevent private data going to the publisher?
Many thanks in advance.
Mirza
The easiest solution is to partition the data - have 2 tables, one for
private and one for public. This way, the data is protected and can be
selectively replicated. To show the data to the user on teh subscriber you
could use partitioned views, or standard views with an instead-of trigger.
Cheers,
Paul Ibison SQL Server MVP, www.replicationanswers.com
(recommended sql server 2000 replication book:
http://www.nwsu.com/0974973602p.html)
Merge Replication Problem
I use a Merge replication between 2 SQL Servers (I try with PUSH or PULL
Subscription but same problem)
Each morning in the server A I have scheduled an Import from exterenal data
( I make a DELETE all table and INSERT al data each morning)
After I schedule the creation of Snapshot in the Publisher and each hour is
scheduled the Merge replication (PUSH or PULL is the same)
The result is that in the Subscriber it make correctly the DELETE but not
the INSERT, the table in the Subscriber is empty and for all the day it says
"No merge data to replicate"
If manually it make the reinitialization in the Subscription, next merge
replication work perfectly and it works for all the day until next morning
when the script make the Import (DELETE with INSERT)
Some suggestions? Please...
Thanks a lot
Bonato Pierantonio, MCSD
Bonato - how are you doing the insert? There are 2 common reasons why the
merge triggers don't fire:
(1) If you bulk insert the rows and choose the defaults, then FIRE_TRIGGERS
is false and consequently the rows are not added to MSmerge_contents.
(2) If you do a fast-load using the Transform Data task in DTS
Fixing either of these will help new imports. In the case of already-added
rows which need replicating, you need to run sp_addtabletocontents to
include the rows then resynchronise. Alternatively you can use
sp_mergedummyupdate for a single row. For the fast load case, in future if
you deselect the check box the triggers will fire.
Cheers,
Paul Ibison SQL Server MVP, www.replicationanswers.com
(recommended sql server 2000 replication book:
http://www.nwsu.com/0974973602p.html)
merge replication problem
The publisher is our internal server (distributor is also on this server) and the subscriber is the internet server. I am also using the push subscription option for the subscriber. Right now our firewall blocks acces from our internet server (subscriber) to our inside server(publisher) and i get an error message from the merge agent saying the process could not connect to subscriber.
Is there any way to make it work using the merge agent ?
Thanks folksCheck this article:
http://support.microsoft.com/?id=321822
Monday, March 19, 2012
Merge Replication over VPN over the Pond
We have two servers, one in North America, one in Europe, that are connected
by a firewall VPN. The firewalls have built-in encryption processors, so the
VPN encryption doesn't cause a speed issue. We are running SQL 2000 SP3 on
Windows 2003 Server.
We are currently hosting about 25 databases on the European server and using
Merge Replication to replicate between the servers. The Merge Agents are set
up to start every hour, and they are also running continuously (I manually
added the -continuous flag to the merge agent run step).
Right now we get various error messages during peak usage times. I have
already gone into the agent profiles and tweaked them based on
recommendations from this site among others, but we still get these errors...
I have read somewhere (including in Hilary's book) that there is an
-FTPAddress flag that you can put in the merge agent. Does this mean that if
you put that flag into the agent details, it will use FTP instead of TCP/IP
to transmit the merge data?
We get significantly faster download speeds when using FTP, so I would like
to set up as much FTP usage as possible, not just FTP'ing of the snapshots
(only once/week), but FTP of all merging information.
Right now our publisher with live data is in Europe, and our distributor is
in North America on the same server as the "backup" subscription databases.
Any insight would be greatly appreciated.
FTP uses tcp/ip protocol under the covers, so it probably won't help you.I
suspect you see performance improvements using FTP in applying your
snapshots as they are likely compressed. Otherwise I don't think you will
see performance improvements over UNC with FTP.
Exactly what are the error messages you are getting with merge replication.
Many of these errors are transitory and clear the next time the merge agent
runs.
Merge is a difficult beast to tune - you might want to review -
http://msdn.microsoft.com/library/de...artitioned.asp
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
"Hugh" <Hugh@.discussions.microsoft.com> wrote in message
news:E34D79B5-A506-4129-8F87-B94D90558F4D@.microsoft.com...
> Hi,
> We have two servers, one in North America, one in Europe, that are
> connected
> by a firewall VPN. The firewalls have built-in encryption processors, so
> the
> VPN encryption doesn't cause a speed issue. We are running SQL 2000 SP3
> on
> Windows 2003 Server.
> We are currently hosting about 25 databases on the European server and
> using
> Merge Replication to replicate between the servers. The Merge Agents are
> set
> up to start every hour, and they are also running continuously (I manually
> added the -continuous flag to the merge agent run step).
> Right now we get various error messages during peak usage times. I have
> already gone into the agent profiles and tweaked them based on
> recommendations from this site among others, but we still get these
> errors...
> I have read somewhere (including in Hilary's book) that there is an
> -FTPAddress flag that you can put in the merge agent. Does this mean that
> if
> you put that flag into the agent details, it will use FTP instead of
> TCP/IP
> to transmit the merge data?
> We get significantly faster download speeds when using FTP, so I would
> like
> to set up as much FTP usage as possible, not just FTP'ing of the snapshots
> (only once/week), but FTP of all merging information.
> Right now our publisher with live data is in Europe, and our distributor
> is
> in North America on the same server as the "backup" subscription
> databases.
> Any insight would be greatly appreciated.
|||Hi Hilary,
Thanks for the response. Here are some of the errors we get:
The subscription to publication "xxxxx" is invalid. General Network Error.
or...
The agent is suspect. No response within the last 10 minutes.
or...
The process could not enumerate deletions at the Publisher. General Network
Error.
You are right, these errors go away when the merge agent restarts itself,
but I would like to get rid of them entirely, of course.
I have read the article you suggested, but we aren't doing any partitioning,
as the entire database is being mirrored. But from what I read there, the
replication will work better if the database is tuned, so looking into index
tuning is probably a good next step?
Oh, and when is the Merge book coming out? ;)
Thanks for the help.
|||Hi Hugh,
Just curious, what Firewall VPN product do you use? I'm intrigued by the
built-in encryption processor feature...
Thanks,
Brad
"Hugh" <Hugh@.discussions.microsoft.com> wrote in message
news:E34D79B5-A506-4129-8F87-B94D90558F4D@.microsoft.com...
> Hi,
> We have two servers, one in North America, one in Europe, that are
> connected
> by a firewall VPN. The firewalls have built-in encryption processors, so
> the
> VPN encryption doesn't cause a speed issue. We are running SQL 2000 SP3
> on
> Windows 2003 Server.
> We are currently hosting about 25 databases on the European server and
> using
> Merge Replication to replicate between the servers. The Merge Agents are
> set
> up to start every hour, and they are also running continuously (I manually
> added the -continuous flag to the merge agent run step).
> Right now we get various error messages during peak usage times. I have
> already gone into the agent profiles and tweaked them based on
> recommendations from this site among others, but we still get these
> errors...
> I have read somewhere (including in Hilary's book) that there is an
> -FTPAddress flag that you can put in the merge agent. Does this mean that
> if
> you put that flag into the agent details, it will use FTP instead of
> TCP/IP
> to transmit the merge data?
> We get significantly faster download speeds when using FTP, so I would
> like
> to set up as much FTP usage as possible, not just FTP'ing of the snapshots
> (only once/week), but FTP of all merging information.
> Right now our publisher with live data is in Europe, and our distributor
> is
> in North America on the same server as the "backup" subscription
> databases.
> Any insight would be greatly appreciated.
|||Hi Brad,
Sonicwalls have a built in HMAC MD5 processor for VPN, so if you leave the
vpn tunnels with thier default encryption settings, everything runs through
the encryption processor.
Cheers,
Hugh.