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


Post New Web Links

Bi-directional Replication conflict handling and resoltion?

Posted By:      Posted Date: September 29, 2010    Points: 0   Category :Sql Server
 

hi all

i want to know how to reslove conflicts when using Bi-directional transactional replication ,,conflicts like

1-If you insert a record that has a key into a table on one of the servers and another record that has the same key already exists on the other servers that participate in the replication, the replication does not propagate the changes to the other servers.

2-When you update a column in a record that is updated at the same time on another server, the data may be different on the two servers.

3-When you update different columns in a record, simultaneous updates of different columns of a record may sometimes lead to conflicts.

4-When you delete a row that is being deleted at the same time on another server that is participating in the replication, the replication fails because the DELETE statement does not affect any rows on some of the subscribers.

..i need help to know what to do to handle this conflicts and if there is any implementation or any ideas about this issue

 

thnx

 

3-




View Complete Post


More Related Resource Links

Bi-directional Replication?

  

hi all

i want to know make 2 way direction replication between 2 databases in different servers ,,i have searched on the internet and i red about Bi-directional replication and merge replication, and p2p replication and i red about the difference between them ,,i want to know how to configure bi-directional replication in sql server 2008 and is Bi-directional replication supports conflict resoltion or not? if not i red that merge replcation supports conflict resolution i want to know how does it works

thnx


Bi-Directional Transaction Replication?

  
0

hi all

i want to know how to reslove conflicts when using Bi-directional transactional replication ,,conflicts like

1-If you insert a record that has a key into a table on one of the servers and another record that has the same key already exists on the other servers that participate in the replication, the replication does not propagate the changes to the other servers.

2-When you update a column in a record that is updated at the same time on another server, the data may be different on the two servers.

3-When you update different columns in a record, simultaneous updates of different columns of a record may sometimes lead to conflicts.

4-When you delete a row that is being deleted at the same time on another server that is participating in the replication, the replication fails because the DELETE statement does not affect any rows on some of the subscribers.

..i need help to know what to do to handle this conflicts and if there is any implementation or any ideas about this issue

 

thnx

 


how to resolve conflict when using sql service broker to do bidirectional replication?

  

greetings ,,

after spending days in search about the best practice to make bi-directional replication between 2 databases on 2 distributed sql server instances ,,i have found that sql server service broker is the most suitbale with my business req to use as i have a problem with the updatable subscrption replication due to leased line between networks in 1 MEGA and it will be large amount data that will be replicated and that will not work as the latency will increase ,,but i need some help to know how can i resolve these conflicts when i am using sql server broker service:

1-If you insert a record that has a key into a table on one of the servers and another record that has the same key already exists on the other servers that participate in the replication, the replication does not propagate the changes to the other servers.

2-When you update a column in a record that is updated at the same time on another server, the data may be different on the two servers.

3-When you update different columns in a record, simultaneous updates of different columns of a record may sometimes lead to conflicts.

4-When you delete a row that is being deleted at the same time on another server that is participating in the replication, the replication fails because the DELETE statement does not affect any rows on some of the subscribers.

 


SQL 2008:Peer 2 Peer Replication: Update-Update Conflict on the same node

  

My environment is comprising of 2 SQL servers setup with P2P replication in SQL 2008, 2 Web servers connect to only one SQL server at a time and make changes to the published tables and 2 Application servers which connects to both the SQL servers all the time but they only read data.

We chose P2P since my app servers are in different locations which read data from both the SQL servers and we use it as HA solution.

Since we are changing data at only one SQL server, thought we should never get update-update conflicts but we are now on the same node.

A conflict of type 'Update-Update' was detected at peer 3 between peer 1 (incoming), transaction id 0x0000000000725ca2 and peer 1 (on disk), transaction id 0x00000000007259e9 (Source: MSSQLServer, Error number: 22815)

We are making changes only at Server A and Server B is my backup server.

I made a varchar field updated in 1 row on a table in server A then it gets replicated to Server B
then I made the same field updated for 160 rows on the same table in Server A then it gets replicated to Server B
then I reverted back the change made to the field on all 160 rows on the same table in Server A then my replication failing with Update-Update conflict.

I'm not sure whats causing this because I'm not making any change

Merge Replication and Conflict Management

  

Hi,

I am a newbee and now setting up Merge Replication on SQL Server 2005 as below.

Step1   Publisher > Node1 >publisher

In the morning,   Node1 will sync with Publisher, update data and sync back to Publisher.

Step2   Publisher > node2 > Publisher

Then, later Node2 will sync with Publisher, update data and sync back to Publisher.

 

My problem here is

In Step 2, if Node1 accidentally modify data and sync with Publisher after Node2 is synchronized , the data from Node2 would be overwritten once it sync back to publisher due to conflict as Publisher always has high priority.

So what I want is simply giving Node2   a high priority not to over write its data once sync with publisher back. But node 2 will get data if there is no conflict.

I know there are some conflict resolvers but I don't know how to use them.

thank you

zawhtway


Custom Conflict Resolver in Merge Replication

  

Hi,

I am a newbie and now setting up Merge Replication on SQL Server 2005 as below.

Step1   Publisher1 > Node1 > Publisher1

In the morning,   Node1 will sync with Publisher1, update data and sync back to Publisher1.

Publisher1 and Publisher2 are quite similar (some articles are the same)

Step2   Publisher2 > Node2 > Publisher2

Here I want to write a custom code for conflict resolver where Node2 will always be a winner whenever the conflict occurs. If there is no conflict, data will be sync.

I tried to use a Conflict resolver comes along in SQL Server 2005, but it also affect not only in the conflicting situation but also in normal merging without conflicts.

thank you

zawhtway


EXCEPTION HANDLING IN C#

  
Every self-respected programmer should include exception handling techniques. Sometimes your application will generate an error. Regardless of who was responsible for this error, the programmer or the user, it is up to the first to include the necessary exception handling techniques to keep his/her program from crashing. The .Net environment provides useful techniques for avoiding disastrous errors such as try-catch statements and user-defined exceptions.

Global Exception Handling with ASP.NET

  
After your global exception handler has done its work, you'll want to redirect the users of your website to a friendly page that tells them that something has gone wrong, and then provide them with customer support information as well as a link back to your web application's home page.

SQL Server 2005 Try and Catch Exception Handling

  
I'm pretty excited to see that there is some real error handling for T-SQL code in SQL Server 2005. It's pretty painful to have your wonderfully architected .NET solution tainted by less-than-VBScript error handling for stored procedures in the database. The big difference being the addition of TRY..CATCH blocks. Let's take a look:

Handling 404 page not found with Error page

  

Hi,

      How do i handle 404 page not found?


Error while using exception handling block el 4.1

  

Hi Folks,

 

i am trying to use tyhe exception handling block of Enterprise library 4.1.

 

I just createda polisy and used IndexOutOfRangeException and added a replace handler and a logging handler to it.

I am using the NotifyRethrow PostHandlingAction to the exception.

 

During runtime I am getting an exception on the HandleException event, The exception is added below:

 

 

Object reference not set to an instance of an object.

Description: An unhandled exception occurred during the execution of the current web request. Please review the stack trace for more information about the error and where it originated in the code.

Exception Details: System.NullReferenceException: Object reference not set to an instance of an object.

Source Error:

Line 42:             catch (Exception ex)
Line 43:             {
Line 44:                 bool reThrow = ExceptionPolicy.HandleException(ex, "ReplacePolicy");
Line 45:         

Session handling

  

I am beginner to asp.net. I wanna set up a login page in ASP.NET. I dont like to use ASP.NET's own Login facilities.. I wanna use session object..How will I block visiting "user page" by clicking the back button of the browser after successfull logout 

 

Pls help me..


Handling external C++ exceptions

  

Hi. I'm working in a application that uses an external .Dll developed in C++ language. According the business rule, the .Dll can throws one exception if it found a error. My question is if it's possible handle or catch a exception throwed by the C++ dll? The try/catch doesn't works. Bellow there's the code I'm using to call the C++ dll.

        [DllImport("kernel32")]
        public extern static IntPtr LoadLibrary(string lpLibFileName);

        [DllImport("kernel32", CharSet = CharSet.Ansi)]
        public extern static IntPtr GetProcAddress(IntPtr hLibModule, string procName);

        [DllImport("kernel32")]
        public extern static bool FreeLibrary(IntPtr hLibModule);

        [UnmanagedFunctionPointer(CallingConvention.Cdecl)]
        private delegate void DllMethodCallBack(string param1, string param2);

        public void CallDllMethod(string param1, string param2)
        {
  &nb

CLR Inside Out: Handling Corrupted State Exceptions

  

There's a danger in using one-size-fits-all exception handling, and you need to know how to avoid it by being as specific as possible about how you handle errors.

Andrew Pardoe

MSDN Magazine February 2009


Foundations: Error Handling In Workflows

  

Workflows often define long-running processes and an unhandled failure usually means termination. Avoid this scenario by handling exceptions properly.

Matt Milner

MSDN Magazine February 2009


.NET Matters: Handling Messages in Console Apps

  

Many developers who use the Microsoft .NET Framework think that application type is tied to the libraries that can be used in that application. Stephen Toub clarifies.

Stephen Toub

MSDN Magazine June 2007


Data Points: SQL Server 2005 XML Support, Exception Handling, and More

  

SQL Server 2005 includes several important improvements to the Transact-SQL (T-SQL) language. One added feature is a new kind of trigger that fires when data definition language (DDL) statements run.

John Papa

MSDN Magazine May 2006


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