Please start any new threads on our new site at https://forums.sqlteam.com. We've got lots of great SQL Server experts to answer whatever question you can come up with.

 All Forums
 SQL Server 2005 Forums
 Replication (2005)
 Error while changing Custom Resolver

Author  Topic 

Arni06
Starting Member

5 Posts

Posted - 2007-09-26 : 05:25:29
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!

Arni06
Starting Member

5 Posts

Posted - 2007-09-26 : 09:25:27
Found the solution! If someone is interested, here it is

on the SQL 2000 subscriber, we have
1 - add a new SQL user account named 'sys' and add it in the database users list
2 - create the missing stored procedure (this is due to a bug in the 2000 compatibility level):

quote:
CREATE PROCEDURE [sys].[sp_MSchangearticleresolver ] (
@article_resolver nvarchar(255),
@resolver_clsid nvarchar(40),
@artid uniqueidentifier,
@resolver_info sysname = NULL
) AS
GO



Once it is done, everything works fine! We can change as needed the custom resolver for the publication articles

Hope this will help
Go to Top of Page
   

- Advertisement -