.NET Tutorials, Forums, Interview Questions And Answers
Welcome :Guest
Sign In
Register
 
Win Surprise Gifts!!!
Congratulations!!!


Top 5 Contributors of the Month
Easy Web
Imran Ghani
Post New Web Links

Merge Replication Atomicity - at what point does ALL subscriber data become visible at the publisher

Posted By:      Posted Date: October 28, 2010    Points: 0   Category :Sql Server
 

Hello 

I have a Merge Replication installation going on with about 35 connected devices. When one of the subscribers synchronizes, do the inserted rows appear sporadically on the publication database at different times? Or do they appear all at once?

Can all of these be isolated inside a transaction - this would seem like it should be the default behaviour, in case of a sync being cancelled or failing due to loss of connectivity etc. 

The reason for this question is that another part of the system seems to have queried the publication database during and after a subscriber synchronization with differing results. 

If this is normal, what would be the best solution to ensure data integrity? 

Thank you in advance. 

James




View Complete Post


More Related Resource Links

Merge Replication - Publisher Identity Range Assignment with Disconnected Subscriber

  

Hello everyone,

I have a merge replication topology setup as follows...  Publisher - SQL 2008 SP1, Distributor - SQL 2008 R2 (RTM), Subscriber - SQL 2008 SP1.

I recently had my subscriber disconnected for a couple days.  During this time, I was getting the following error on my publisher:

The insert failed. It conflicted with an identity range check constraint in database 'production', replicated table 'dbo.CustomerOrder', column 'CustomerOrderId'. If the identity column is automatically managed by replication, update the range as follows: for the Publisher, execute sp_adjustpublisheridentityrange; for the Subscriber, run the Distribution Agent or the Merge Agent.

I understand why I would normally get this error, but if the publisher and distributor are both online, why didn't the publisher attain a new range from the distributor after it hit its threshold?  Is this expected behavior whenever a subscriber is disconnected?

Thanks in advance.

Jarret


Merge replication - table with geography data type

  

Hi,

I have a problem with geography data type replication. Any change that is done on a Geography column breaks the replication - the error message is "The Merge Agent failed because the schema of the article at the Publisher does not match the schema of the article at the Subscriber." I double checked compatibility settings that is suggested here: http://social.msdn.microsoft.com/Forums/en-US/sqlreplication/thread/d8e31621-5d43-48cd-bdd3-c02b8a24625c. But both publisher and subscriber are 100RTM.

I checked synchronization logs and found a strange message - attempt to convert varchar to geography. I don't understand from where the varchar data type comes from. Tables at subscriber and publisher has the same format - geometry stored in geography data type.

2010-09-20 18:36:22.499 The Merge Agent failed because the schema of the article at the Publisher does not match the schema of the article at the Subscriber. This can occur when there are pending DDL changes waiting to be applied at the Subscriber. Restart the Merge Agent to apply the DDL changes and synchronize the subscription.
2010-09-20 18:36:22.845 Category:NULL
Source:  Merge Replication Provider
Number:  -2147199398
Message: The

SQL SErver 2008 Merge Replication: Alter Trigger cause syntax error on subscriber site

  

I have 2 clustered instances running on SQL Server 2008 SE-64 patch level 10.0.2531.0. These is one DB on these 2 instances (compatibility_level=80)under merge replication. now I need to change one trigger to add "NOT FOR REPLICATION". One publisher site all is ok but on subscriber site it causes Error 102 Severity 15 State 1 Incorrect Syntax near 'dbo'.

After tracing the error in profiler, I captured the incorrect syntax as below:

exec('ALTER TRIGGER [dbo].[trgBusinessEntityAllocationUpdate] on [dbo].[BusinessEntityAllocation] 
 [dbo].[BusinessEntityAllocation] 
FOR 
 UPDATE
 NOT FOR REPLICATION
AS
 
SET NOCOUNT ON
BEGIN
......
END
')

obviously, there is an duplicated part of object name. but the script was generated by replication engine. How could it happened? can anyone help?

Thanks

George 


George the DBA

Data not downloaded with SQLCE Merge Replication

  

Hi.

I've got one problem with a merge replication and windows mobile device.

The database is stored on SQL Server 2005.
It is available with Internet via sqlcesa30.dll, hosted on an other computer.
The local db on Windows Mobile device is sqlce3.

Everything works fine since a lot of months.

But,since few weeks, some devices don't receive some rows.

I think it could be possible because the IIS server with sqlcesa30.dll had the LogOption to full and the actual log file was 800 mb.
I've flushed the file to be sure.

But, I don't know if it will be enough.

About the Event Viewer, the only thing I see is on the Server with SQL, i've got

Replication-Replication Merge Subsystem: agent 0030007B-0038-0044-3400-370042004500 failed. A read operation from the Internet returned an incorrect number of bytes. [,,,,,]

Or

Replication-Replication Merge Subsystem: agent 0038007B-0039-0044-3700-320031003000 failed. De aanvraag voor het verzenden van gegevens naar de computer met IIS is mislukt. Zie HRESULT voor meer informatie. [,,,,,]

But, I do not have a lot of logs like this.

And i've got soo many devices that sync on this db (+-30 each 10 minutes) that it's not easy to know where is the problem.

Is someone has any idea?

 

PS : if found that the only solution

Changing column Data Type when using merge replication: RFC on my SMO code.

  

I maintain an application for that uses SQL 2005 / 2008 for data persistence.
Some clients use Merge Replication (pull or push) to replicate data.

Some of the data the application stores should be "versioned". All versions of a row containing medical information should be stored, somewhere in a database. This means all updates and deletes to those rows should result in in 2 affected rows:

  • a copy of the row before the change
  • a row containing the change (or the deletion of the row in question)

I plan to achieve this using triggers on all the tables for wich "versioning" is required.
The old versions of a row may be stored in the same database, an other database (or a database on a linked server).

Unfortunalty, the AFTER UPDATE, DELETE triggers do not support TEXT, NTEXt an IMAGE data type columns.
Thus I am required to convert all text, ntext and image columns to their respective "new" data types, varchar(max), nvarchar(max) and varbinary(max).

This is not a big issue when the database is not published, but when it is... most articles (and posts) i've read suggest:

  1. Add a column of the target data type to the table, copy data from source column. rename columns and drop the source column.

    OR
  2. Create a temp table (with the s

sql 2005 1 publisher and 2 subscribers for merge replication

  

Hi,

We have 3 servers using sql 2005 having merge replication setup. If we use 1 publisher and 2 subscribers approach, can this replication topology handle single point of failure(i.e. when publisher server is down or not available, can the remaining 2 subscribers synchronize with each others?). If this approach cannot handle single point of failure, is there any other replication setup that can handle single point of failure and able to resolve conflicts for 3 servers using sql 2005?

Thanks and regards,

Wallace

 


How to minimize time when creating 2005 merge replication with very large data files and log files?

  

Dear all,

We're using window server 2003 sp1 + sql ent 2005 sp2 with merge replication between 2 servers. Since 1 of server sql is down, we need to create merge replication again. However, our data file size is 60Gb and log size is 40 GB and when we create merge replication it may need more than 10 hours to finish which is unacceptable since when creating replication the online db normal service operation may be affected. Is there any other way that can reduce the replication creation time within 5 hours to finish? Thanks a lot.

 

P.S: we are using full recovery model and plan to change to simple recovery model. Any help?

 

 

 


What is the maximum size of binary data (varchar(max)) that 2005 merge replication can tolerate

  

Hi,

Since we have experienced creating 2005 ent SP2 merge replication with 60 GB binary data requires 90 hours to finish the whole process(snapshot job + merge job), we just worry that if we still increase the database size to fill in such large binary image and it will finally make merge replication malfunctioning. Just want to ask is there any limitation on image sizes or db sizes if  merge replication need to replicate them? Do u have benchmark testing or experiment that can prove on this upperlimit?

Thanks and regards,

Wallace

 

  


Merge SQL to Excel--Need .Net button to open on fly and have current SQL data!

  

           Hello all,
I do not know if this is the proper place to ask this, but my question is...
I have a SQL DB and I want to convert it to Excel Sheet (I did this using the wizard)!
In my aspx page I have a button.  So when I press this button I want the Excel sheet to open!  But I need the Excel sheet to show me the up to date information that is in the SQL DB.  

merge replication system tables fragmentation issue

  
I have Merge replication going on in my environment. The problem is that system tables like MSmerge_content, MS merge _tombstone and MSmerge_genhistory are getting fragmented. We are rebuilding indexes time to time daily. But we want some good fix. Just send some good idea guys?

Steps by Step document for configuration Merge Replication in 2005

  
Hi , Can anyone provide link to configure Merge Replication in 2005 with print screen.Also let me know the difference between Transcation level and Merge Replication. regards Vijay  

Real-time data replication

  
Are there any ways to replicate sql server production database to a standby database? I notice that there is a feature called 'continuous replication', does it do in real-time? what is the time-lag? Are there any potential data loss (i.e., production transaction committed but production db corrupted before the transaction is sent to standby)? Is the standby database available for read access during the replication?

SQL Server 2005 Merge Replication

  
We did the following: We setup a database with all of standard tables, views, etc. We then put in place merge replication for a few of the tables within this database, including a tables called "Areas". We can execute SQL statements to insert rows into this table fine. We then applied an update script for this database to change a few tables by adding fields and changing indexes, etc.  We didn't change the "Areas" table though. After the update to the database structure, we get an error when trying to insert into this "Areas" table. The error message was the following: The insert failed. It conflicted with an identity range check constraint in database 'AETest', replicated table 'dbo.Areas', column 'AREPrimaryId'. If the identity column is automatically managed by replication, update the range as follows: for the Publisher, execute sp_adjustpublisheridentityrange; for the Subscriber, run the Distribution Agent or the Merge Agent.  The statement has been terminated.   What would cause such a problem and how do we resolve it?  The structure of the "Areas" table before and after the update is the following: USE   [AETest] GO /****** Object: Table [dbo].[Areas] Script Date: 08/24/2010 17:42:36 ******/ SET   ANSI_NULLS ON GO SET   QUOTED_IDENTIFIER ON GO SET   ANSI_PADDING ON

Merge Replication: How to give read access on snapshot share to a sql account

  
Hello All, I want to give read access to an sql account(not windows account). Can it be given or not. Someone please tell. Thanks saandii777

How to prevent Propagation from subscriber to Publisher in some occations

  
We are using merge application. We need sometimes delete some tables at subscriber and that delete command or any other command  should not propagate to Publisher and other subscribers. And sometimes it should be refilled from Publisher. Is it possibe? Second question : My publisher crashed two times. I could attach the database after restoring the OS. But at subscriber I am unable to modify some table and it gives the error invalid object name 'dbo.msmerge.......'. Replication is working fine. What is the reason for this error and how I can get rid of it?

fragmentation in merge replication

  
I have Merge replication going on in my environment. The problem is that system tables like MSmerge_content, MS merge _tombstone and MSmerge_genhistory are getting fragmented. We are rebuilding indexes time to time daily. But we want some good fix. Just send some good idea guys?
Categories: 
ASP.NetWindows Application  .NET Framework  C#  VB.Net  ADO.Net  
Sql Server  SharePoint  Silverlight  Others  All   

Hall of Fame    Twitter   Terms of Service    Privacy Policy    Contact Us    Archives   Tell A Friend