Creating A Conflict Viewer/resolver
May 22, 2006
Hello,
I see that MS has a conflict viewer that can be accessed by managment studio, however I would like to create one with some customized options. Is there a sample of code somewhere to start this? I could really find anything in BOL. Thanks in advance.
John
View 1 Replies
ADVERTISEMENT
Jan 26, 2006
Hi there,
I have created a custom conflict resolver for an article that is using Merge replication. I can register my custom resolver OK, I can change my merge article to use my new custom resolver, but when a conflict occures the replication monitor shows the following errors:
Error messages:
No signature was present in the subject.
(Source: MSSQL_REPL, Error number: MSSQL_REPL-2146762496)
Get help: http://help/MSSQL_REPL-2146762496
The Custom Resolver Component for article 'BRANCH' does not have a valid digital signature. (Source: MSSQL_REPL, Error number: MSSQL_REPL-2147198713)
Get help: http://help/MSSQL_REPL-2147198713
At first I thought it was because my assembly wasn't signed, so I signed it. I still get the same error.
I have various debug statements in the assembly and I can see that Initialize and HandleChangeStates gets called ok, but no other overrides.
Can anyone help me please?
Thanks
Graham
View 3 Replies
View Related
Jan 18, 2007
Hi Everyone!
Here another post on replication.
When conflict occur, I want the user to be able to select witch row to keep and witch to delete.
I've look for system stored procedure, that could help me do the resolution but I've founded nothing.
So I've thought that I could do it by hand, with UPDATE/DELETE query
Take the row in the %TABLE_NAME%_Conflict table and copy it into the real table, than delete the row.
I this the good way of doing it?
Is there any other way?
Thanks !
View 5 Replies
View Related
Nov 6, 2006
Hello,
I'm trying to setup the Interactive Conflict Resolver in my C# app via RMO. (using SQL Server 2005)
The only article I can find on MSDN or anywhere is involing T-SQL. Can someone please shed some light on this for me specificaly on the subscriber side.
Thank you! Chris
View 2 Replies
View Related
Sep 20, 2005
Hi, I'm replicating a database between two instances of Sql 2000 using Merge Replication. I have no custom resolvers at present but I'm seeing something unexpected.
View 5 Replies
View Related
Oct 2, 2006
Hi all,
I need to write a custom conflict resolver for an application using merge replication. It's relatively simple logic - compare the two rows from the publisher and the subscriber and the winner is based on the value of one particular column.
Reading BOL gives me the input parameter list for the sp, and specifies that the output should be exactly the winning row. What is doesn't give is any example of how to do this, in particular how to access the two rows in conflict so that they can be compared.
I can do this by dynamically building SELECT statements, one connecting to the table locally on the publisher and another connecting to the subscriber using the form SERVER.DATABASE.OWNER.TABLE, but this requires me to explicitly have the subscriber as a linked server to do this. An example of my revolting code is appended to this post.
Is this what I have to do, or is there some table I can access on the publisher that has the conflicting rows in so I can compare them without going back to the subscriber?
Thanks for your help
Richard
---- code sample --
ALTER PROCEDURE [dbo].[prRep_ResolveInventoryConflicts]
@tableowner sysname, @tablename sysname, @rowguid uniqueidentifier,
@subscriber sysname, @subscriber_db sysname,
@log_conflict int OUTPUT, @conflict_message nvarchar(512) OUTPUT,
@destination_owner sysname
AS
BEGIN
DECLARE @qrySubscriber varchar(255)
DECLARE @qryPublisher varchar(255)
DECLARE @Publisher sysname
DECLARE @RecentCheck datetime
-- Temp table with same form as tbl_Inventory
CREATE TABLE #ConflictingRows (
[Machine] [sysname]NOT NULL,
[LocationID] [int] NOT NULL,
[PartGUID] [uniqueidentifier] NOT NULL,
[Qty] [int] NOT NULL ,
[LastUpdatedDtm] [datetime] NOT NULL,
[LastUpdatedUser] [varchar](50) NOT NULL ,
[rowguid] [uniqueidentifier] NOT NULL
)
-- Build the T-SQL To run against publisher and subscriber
SET @Publisher = @@Servername
SET @qryPublisher =
'INSERT INTO #ConflictingRows
SELECT '+@Publisher+' as Machine, * FROM '+@tableowner+'.'+@tablename+
'WHERE rowguid = '+CAST(@rowguid as varchar(40)) +';'
SET @qrySubscriber =
'INSERT INTO #ConflictingRows
SELECT '+@subscriber+ ' AS Machine, * FROM '+@subscriber+'.'+@subscriber_db+'.'+@tableowner+'.'+@tablename+
'WHERE rowguid = ' + CAST(@rowguid as varchar(40)) +';'
-- execute the stored procedures
EXECUTE @qryPublisher;
EXECUTE @qrySubscriber;
-- Compare the two rows and return the winning row, ie the one that was last updated by a human checking the inventory
SELECT @RecentCheck = MAX(LastUpdatedDtm) FROM #ConflictingRows
SELECT TOP 1 * FROM #ConflictingRows where LastUpdatedDtm=@RecentCheck;
-- Cleanup and exit
DROP TABLE #ConflictingRows
END
----
View 11 Replies
View Related
Dec 5, 2006
Hi!
I'm trying to create a custom conflict resolver for SQL Server 2000 in
C# but i can't seem to find any source code examples of a *.dll where i
can actually see what needs to be done.
Any help is welcome.
Thanks
View 3 Replies
View Related
Dec 21, 2006
Hi everyone,
I am working on a COM-based custom conflict resolver (vb.net) for a merge replication problem that I am having. This is what I am trying to accomplish. 1. Have a Last_Upd_Dt column. 2. When there is a conflict between publisher and subscriber on a column, the winner is the most recent date in Last_Upd_Dt and want the value for that column from that source. 3. If there is no conflict on a column and the column was updated by either the publisher or subscriber, I want to keep the change made by the publisher or the subscriber. (i.e publisher made change in col #1, subscriber made change in col #2, no conflict, the resulting row will now have the col #1 value from publisher, col # 2 will have value from subscriber. Essentially merging the changes.)
Does anyone have any examples of a COM-based Conflict Resolver that implements ICustomResolver for SQL Server 2005? Can this be done using the Business Logic Handler (examples?) ?
TIA
View 4 Replies
View Related
Aug 4, 2015
I have been evaluating merge replication, 'push' subscription on SQL Server 2014. If the default resolver is used (I refer to @article_resolver parameter of sp_addmergearticle), all seems to work as expected. However if I use "Microsoft SQL Server Subscriber Always Wins Conflict Resolver" (or any other MS standard resolver for that matter), if the Subscriber is on a different machine, the merge agent invariably gives the following error: "The process could not initialize <resolver_name>. Verify that the component is registered correctly."
This does not happen if the Subscriber is on the same machine as the Publisher and Distributor.
The problem seemed to exist in SQL Server 2008 according to some posts but it has been apparently fixed since then. I've tried the following:
- @partition_options = 0, as was suggested somewhere.
- Copied ssrpub.dll (the resolver dll) to the Subscriber machine (should not really matter as this is 'push' subscription?)
- Registered ssrpub.dll with regsvr32 on the Publisher/Distributor machine.
I've also run sp_enumcustomresolvers on the Publisher machine, and it happily showed all standard resolver, including the "Microsoft SQL Server Subscriber Always Wins Conflict Resolver".
Another thought is, I'm using SQL Server Express as the Subscriber (on the remote machine). Perhaps it does not support custom resolvers? (I'm using the full SQL Server in the 'local subscriber' variant, which does work OK as I mentioned before).
Note also that if I create a new publication via SSMS, the Resolver tab of the Article Properties dialog is empty, i.e. it does not list any resolver. The same tab contains the full list of resolvers though, if opened for an existing publication.
View 2 Replies
View Related
Oct 12, 2007
I am using SQL 2005 build 9.0.2227
I have a custom conflict resolver - which fires on update conflicts (using row level tracking)
I have had a couple of occasions when the resolver has failed with the following error:
"The schema of the custom Dataset object implemented in the business logic handler does not match the schema of the source Dataset object. Verify that the custom Dataset object has been correctly defined"
In both cases I found that the row for which a conflict was being handled was not a conflict at all. One was a straightforward non conflicting update at the publisher and the other was a similar update at the subscriber.
I got round the problem by temporarily using a fix version of the conflict resolver dll that either set the custom Dataset to the publisher dataset or the subscriber dataset - depending on where the update had occurred.
When the first error (publisher update) occurred - the resolver code was basing the custom dataset on the publisher dataset - which was presumably empty - so I changed the code to base the custom dataset on the subscriber dataset. The second error therefore occurred when the custom dataset was based on the subscriber dataset - which again was presumably empty
Note that the tables involved in each occasion were different and neither table is filtered.
Is there a known bug in this area?
I am considering trying to change the resolver code to identify false conflicts in order to workround the problem - but this would be difficult to test as I can't reproduce the problem
aero1
View 2 Replies
View Related
May 17, 2007
I created a stored procedure based custom conflict resolver in SQL 2005, I return the winning result set and also save that result set to a test table to compare the values. The values saved to the test table are correct but some of the values saved as the conflict winter are truncated.
Example a char(3) filed is updated at the subscriber as €˜111€™ and updated at the publisher as €˜222€™, in my custom conflict resolver if I use the value from the subscriber the conflict resolver updates the field as €™11 €˜, if I use the publisher value the conflict resolver updates the field as €™22 €˜. Now the same records is saved to the test table correctly as either €˜111€™ or €˜222€™ depending on the logic I used. So the result set has the correct values, its after the custom conflict resolver is called where the values is somehow truncated. Has anybody run into this before and what steps can I take to avoid this.
Thank you,
Pauly C
View 1 Replies
View Related
Aug 24, 2006
Hello,
executing the first script listed below resulted in the error message (translation):
Message 7890, Level 16, Status 1, Line 1
Error when registrating Endpoint. Potential port conflict ...
use AdventureWorks;
go
CREATE ENDPOINT SQLEP_AWPersons
STATE = STARTED
AS HTTP
(
PATH = '/AWpersons',
AUTHENTICATION = (INTEGRATED),
PORTS = (CLEAR),
SITE = '*'
)
FOR SOAP
(
WEBMETHOD 'PersonInfo'
(NAME='AdventureWorks.dbo.uspGetPersonInfo'),
BATCHES = DISABLED,
WSDL = DEFAULT,
DATABASE = 'AdventureWorks',
NAMESPACE = 'http://Adventure-Works/Persons'
)
I changed the port in the script to 8084:
PORTS = (8084),
Error Message 102: Wrong Syntac near ')'.
I changed the port in the script to '8084':
Error Message 7888: The stated IPv6-Address is not supported. The server is potentially not configured for the IPv6 Connectivity or the address is not formated in an known IPv6-Format.
Could you help?
Best regards,
Wolfgang
View 3 Replies
View Related
Oct 18, 2006
Hi all sql guru's
I'm having this problem for a while now and can't find any solid answer on the net for it.
I have 2 server in diffrent location ( +- 1200k's) away from eachother. When the msmerge agent run it return the following error and return the status as successfull with the following error information:
(The colum information specified for the MS SQL Server maximum conflict resolver) Resolver is either missing or incorrect. I've change every single article to "Latest chagne wins". Any suggestion. I happend when the power failed and the server got restarted.
View 1 Replies
View Related
Sep 26, 2007
Hi all,
here is the context of our problem:
- Publisher : version SQL Server 2005 SP2, table in SQL Server 2000 (80) compatibility level, publication in SQL Server 2000 compatibility level
- Distributor : SQL Server 2005 SP2
- Subscriber : SQL Server 2000 SP4 + hotfixes (version 8.00.2187)
There is only one article in our publication (a simple table with a GUID and a nvarchar(50) columns), and we have left the default resolver.
1 - The first synchronization of the subscription is successfully completed, and it is the same for the different updates/inserts/deletes or conflicts.
2 - Then we change the Resolver of our article by our own COM-Based Custom Resolver (developped in C# 2.0). This resolver only change the default behaviour: the subscriber always win (this is for a test, in the future we will have a complex business logic). All the synchronizations works fine and do what we want in the conflicts.
3 - We rollback the resolver to the default one... and here is the problem!
The synchonizations stop to work correctly. For all of them we've got the same error:
quote:Replprov.dll , 2007/09/25 14:26:07.591, 4000, 16890, S1, ERROR: ErrNo = 0x80045017, ErrSrc = <null>, ErrType = 8, ErrStr = The schema script '
declare @cmd nvarchar(1000)
set @cmd='exec sys.sp_MSchangearticleresolver @article_resolver=@ar, @resolver_clsid=@rc, @artid=@ai, @resolver_info=@ri'
exec dbo.sp_executesql @cmd, N'@ar> nvarchar(255),@rc nvarchar(40),@ai uniqueidentifie..." mailto:N?@ar">N'@armailto:N'@ar">N'@ar</A< A>> nvarchar(255),@rc nvarchar(40),@ai uniqueidentifie...
It is no more possible to synchronize this subscription... Any remark will be helpfull cause we did not find anything on the net concerning this error.
Thanks a lot!
View 1 Replies
View Related
Sep 7, 2006
Hi there!
I'm trying to create a custom resolver for merge replication exactly like in the MS example.
It seems to work, but only ONE time. If I change, insert or delete a
record in a table the second time, the subscriber monitor comes with
the following errors:
Error messages:
Attempted to read or write protected memory. This is often an
indication that other memory is corrupt. (Source: MSSQL_REPL, Error
number: MSSQL_REPL-2147199411)
The Merge Agent encountered an error when executing code in the
'UpdateHandler' method implemented in the business logic handler
'D:Program FilesMicrosoft SQL Server90COMMyResolver.dll'. Ensure
that the overridden 'UpdateHandler' method has been properly
implemented in the business logic handler. (Source: MSSQL_REPL,
Error number: MSSQL_REPL-2147199411)
This last error is of course dependant on my action (update, delete, insert).
My code is -exactly- like the example (I just stripped out the log message).
Does anyone know why I am "trying to read or write protected memory" ?
The thing is that I'm trying to create an application that detects if a
table changes. Is this the right way to do this anyway or are there
better solutions?
Any help is appreciated! Thanks!
View 13 Replies
View Related
Jan 22, 2007
Hi,
I have created a custom resolver in VB .net (VS2005). The resolver works ( Both Publisher and Subscriber are SQL 2005 ), but I need to be able to debug the code within the resolver. How do I do this? I have tried a number of things without success.
Any suggestions would be appreciated.
Cheers
Neil
View 3 Replies
View Related
Sep 25, 2007
Hi all,
here is the context of our problem:
- Publisher :
version SQL Server 2005 SP2
table in SQL Server 2000 (80) compatibility level
publication in SQL Server 2000 compatibility level
- Distributor : SQL Server 2005 SP2
- Subscriber : SQL Server 2000 SP4 + hotfixes (version 8.00.2187)
There is only one article in our publication (a simple table with a GUID and a nvarchar(50) columns), and we have left the default resolver.
1 - The first synchronization of the subscription is successfully completed, and it is the same for the different updates/inserts/deletes or conflicts.
2 - Then we change the Resolver of our article by our own COM-Based Custom Resolver (developped in C# 2.0). This resolver only change the default behaviour: the subscriber always win (this is for a test, in the future we will have a complex business logic). All the synchronizations works fine and do what we want in the conflicts.
3 - We rollback the resolver to the default one... and here is the problem!
The synchonizations stop to work correctly. For all of them we've got the same error:
Code SnippetReplprov.dll , 2007/09/25 14:26:07.591, 4000, 16890, S1, ERROR: ErrNo = 0x80045017, ErrSrc = <null>, ErrType = 8, ErrStr = The schema script '
declare @cmd nvarchar(1000)
set @cmd='exec sys.sp_MSchangearticleresolver @article_resolver=@ar, @resolver_clsid=@rc, @artid=@ai, @resolver_info=@ri'
exec dbo.sp_executesql @cmd, N'@ar> nvarchar(255),@rc nvarchar(40),@ai uniqueidentifie..." mailto:N?@ar">N'@armailto:N'@ar">N'@ar</A< A>> nvarchar(255),@rc nvarchar(40),@ai uniqueidentifie...
It is no more possible to synchronize this subscription... Any remark will be helpfull cause we did not find anything on the net concerning this error.
Thanks a lot!
View 3 Replies
View Related
Jan 7, 2002
Hi!
Does anybody know if there are any conflicts using an XP computer as server and running SQL 7.0 on it?
I have a laptop using Windows XP, that I also have installed SQL 7.0 on (desktop version). I use it both as a client and as a server. As a client I am connecting to the NT server and it is working perfectly. When I try to run my SQL developed software against the local server though, I get a message saying
"-2147217900 - Duplicate record or Record is in use.
The request for procedure "TABLE NAME" failed because "TABLE NAME" is a table object"
Any suggestions how to solve this?
thanx in advance
/Corinne
View 2 Replies
View Related
Oct 28, 2007
why do i get collation conflict when i used temp table ??Cannot resolve the collation conflict between "Latin1_General_CI_AI" and "SQL_Latin1_General_CP1_CI_AS" in the equal to operation.i solved it by using COLLATE Latin1_General_CI_AS (the column name)will i have collation conflicts again when i put my web app on a web hosting company??
View 3 Replies
View Related
Sep 24, 2004
Hi;
I have 2 tables Users and DVDTestResults these tables have a relation over UserID
Users.UserID
DVDTestResults.UserName
both char
But when I try to insert in DVDTestResults I am having an error:
INSERT statement conflicted with COLUMN FOREIGN KEY constraint 'FK_DVDTestResults_Users'. The conflict occurred in database 'Test', table 'Users', column 'UserID'. The statement has been terminated.
can you help me why?
thank you....
View 7 Replies
View Related
Dec 10, 2004
Hi All;
I am getting ;
INSERT statement conflicted with TABLE FOREIGN KEY constraint 'FK_ChecklistCases_ChecklistFGroups'. The conflict occurred in database 'Test', table 'ChecklistFGroups'. The statement has been terminated.
but it seems to be no error can you help me please I can send you the related part of database
thank you
View 1 Replies
View Related
Sep 7, 2005
I am doing this in SQL Query analyzer:select dbo.GetTimedifference(CAST('5:30 PM' AS DATETIME),CAST('12:00 PM' AS DATETIME))it will give me (- 05:30) which is correct if i am talking about 12:00 PM midnight, what if I ment 12:00 PM in the noon, I mean, 11:00 AM, then 12:00 PM, it should give me, (5:30)since 5:30 Pm is 5:30 hours pass 12:00 PM noon, how can I solve that ?thanks a lot.
View 4 Replies
View Related
Feb 13, 2001
Hi
I'm using merge replication between 10 SQL server 7.0 SP2 machines. One central server is the publisher and 9 subscribers. I’ve setup an alert to get a message in case of conflicts. I defined it to trigger everytime the performance counter conflicts/sec rises above 0.
After some experimenting this seems now to work reliable, but there is still one point which bothers me. All conflicts are kept in the conflict history and everytime I get a message through the alert the number of copnflicts stated in the message increases by one.
Also if I open view replication conflicts in EM all conflicts can still be viewed even those I manually resolved. I can't even find a way to seen which conflicts are new ones and which have been resolved already. Does anybody know a way how to reset this numbers without going through all the conflict tables.
Markus
View 1 Replies
View Related
Jul 9, 2004
I have a database thats got sql as the engine and access 2000 for the client side. and every time I edit a record this "Write Conflict" comes up. I dont know why its doing that but Idont want that happening whent the database goes live and my users start editing records. what do I, apparently its a Replication Conflict
View 14 Replies
View Related
Jul 22, 2004
has anyone had sucess in troubleshooting conflicts between these two?
I need to shut down the sybase client on a machine that is running MS SQL if thats possible.
View 3 Replies
View Related
Mar 2, 2006
Hi all,
I have a db server which was installed with Collation 'SQL_Latin_General_CP1_CS_AS' and now I have to replace this server with a new server and I want to install this server with Collation 'SQL_Latin_General_CP1_CI_AS'.
I am using Linked Servers to collect some data from my Sybase database which has "Code Page 850 (Multilingual) character set,us_english,Binary ordering, for use with Code Page 850 (cp850)."
But with new SQL server(case-insensitive settings), I am unable to run a select query (joining a local server and sybase server) and I get an error message "cannot resolve collation conflict for equal to operation"
I have tried changing property of linked server by specifying Remote server collation to true and Collation Name as 'SQL_Latin_General_CP1_CS_AS' as well as 'SQL_Latin_General_CP850_Bin' but I do get the same error message.
Could any of you please help me in this regard ?
Thanks in advance.
Wilson
Edit: Sorted out. Somehow it is working now after specifying Remote server collation to true and Collation Name as 'SQL_Latin_General_CP1_CS_AS'
View 1 Replies
View Related
Aug 8, 2007
Moving code from Sybase to SQL Server 2005. I have two tables. One table (vINID) is reset and populated right before this code runs. The other table (vINPA) is a table in the database used by the Front End App. This is the error I get when I try and run on our SQL Server 2005.
Msg 468, Level 16, State 9, Line 1
Cannot resolve the collation conflict between "SQL_Latin1_General_CP1_CI_AS" and "Latin1_General_BIN" in the equal to operation.
Here is the SQL code:
SELECT DISTINCT
vINID.BLEI_CK,
vINID.BLIV_ID,
ISNULL(vINPA.RCPT_AMT,0) AS RCPT_AMT
FROM Reporting_DEV.dbo.RPT_04597_INID AS vINID -- table re-populated
LEFT JOIN fauafpr0_pids.dbo.CDS_INPA_PMT_ACT AS vINPA
ON vINPA.BLIV_ID = vINID.BLIV_ID
WHERE vINID.BLIV_ID = '071600007594'
Thank you for your help.
David
View 3 Replies
View Related
Apr 15, 2004
i have converted an access database to SQL
and now when i add a record and then later go back to change the new data it says that their is a write conflict
ne ideas????
thanks
Kris
View 3 Replies
View Related
Nov 30, 2005
All,
How do I solve a primary key conflict for a mutiple select statement.
When SQL finds a duplicate entry I doesn't ignore it like access but it doesn't insert anything.
It should be something like where not in.....
Thanks in advance
CREATE PROCEDURE [dbo].[z_qry_history_1_is]
AS
INSERT INTO r_tbl_history_is_rg ( ean_code, contractnr, switch_id, bakje, week, jaar )
SELECT distinct r_tbl_is_open.ean_code,
r_tbl_is_open.transaction_id,
r_tbl_is_open.switch_id,
r_tbl_is_open.bakje, datepart(ww,getdate()) AS Expr1, datepart(yyyy,getdate()) AS Expr2
FROM r_tbl_is_open;
GO
Violation of PRIMARY KEY constraint 'aaaaar_tbl_history_is_rg_PK'. Cannot insert duplicate key in object 'r_tbl_history_is_rg'.
The statement has been terminated.
View 2 Replies
View Related
Apr 5, 2007
While I execute one query its showing this error:
Cannot resolve the collation conflict between "SQL_Latin1_General_CP1_CI_AS" and "Arabic_CI_AS" in the equal to operation.
Can help me please!
Shaji
View 1 Replies
View Related
Mar 14, 2008
I have merge replication set with with one publisher and three subscribers (push subscription). From time to time I get the following in the conflict table:
"The same row was updated at both 'Publisher.database' and 'Subscriber.database'. The resolver chose the update from 'Publisher.database' as the winner"
This is weird because the UPDATE only happend at the given subscriber. I checked the publisher and all other subscribers and there was never an UPDATE on this table. Also, the update at the publisher was actually the record that was already present.
I'm kinda stuck here. Any help or comments are greatly appreciated.
View 1 Replies
View Related
Jul 20, 2005
i have a dts package that is going to run at night and pull data from2 tables in an Oracle db and load it to 2 staging tables that mypackage creates in sql server 2000. i then execute a few sprocs toand columns, indexes, etc. after that all happens successfully i wantto delete the two production tables and rename the staging tables totake their place.the problem is that when i run the sproc to add the indexes,constraints, etc i get an error because objects with the same nameexist on the 2 production tables. i can't delete the productiontables until the very last step. i thought about generating a randomnumber in my sproc and using it as the name of the index but thatseems crude and messy. any ideas?
View 2 Replies
View Related