Limitation of coflict resolver

  • Hi,

    I've made a custom resovler for my database, but it crashes when I make over 100 upd on 2 sub on the same rows at the same time. (100+ conflicts).

    This is the error I've received : The Stored Procedure Resolver encountered the following error executing the stored procedure '[dbo].[AnaResolver]'. Invalid cursor state

    It works fine until the 100 upd or so. i've tested the MS custom resolver for product in northwind (sp_avgprice) and it has the same problem over 100 conflicts.

    pub : SQL 2000 server enterprise sp2

    sub : msde 2000 sp2

    Alain

  • Could you post the code for you SP?

    Gregory Larsen, DBA

    If you looking for SQL Server Examples check out my website at http://www.geocities.com/sqlserverexamples

    Gregory A. Larsen, MVP

  • Keep in mind this is the first of a much more complexe resolver

    CREATE PROC AnaResolver

    @tableownersysname, -- this is the publisher owner, but we assume its always dbo at subscriber.

    @tablenamesysname, -- this is the publisher tablename, but we assume its identical at subscriber.

    @rowguiduniqueidentifier,

    @subscribersysname,

    @subscriber_dbsysname,

    @log_conflictint OUTPUT, -- output param for if to log conflict for later resolution.

    @conflict_message nvarchar(512) OUTPUT -- output param for message to be given about resolution if conflict is loggged.

    AS

    DECLARE

    @pub_qualified_name NVARCHAR(392), -- 3*128 + 2 spaces + 6 quotes

    @sub_qualified_name NVARCHAR(392),

    @lsStringToExecute varchar(5000)

    SELECT @pub_qualified_name = QUOTENAME(db_name()) + '.' + QUOTENAME(@tableowner) + '.'+QUOTENAME(@tablename)

    SELECT @sub_qualified_name = QUOTENAME(@subscriber_db) + '.' + QUOTENAME('dbo') + '.'+QUOTENAME(@tablename)

    select @lsStringToExecute = 'Select [GuID], DirGuID, Company, LegalName, KeyCompany, Addr1, ''Pub1'' as Addr2, CityKey, City, Zip, ProvinceID, Country, Url, LanguageID, SicID, DbSicID, Fss, DbStatus, DbNumber, CltTypeID, CltClassID, CorpClassID, ProsToCust, YedMonth, YedDay, SourceID, LisNumber, GstNumber, PstNumber, ChartID, SalesID, StartDate, StartGe, ChrisCard, Diary, EftName, EftAddress, EftNumber, EftTransit, EftAccNo, Other1, Other2, Other3, Other4, Other5, Others, PotentID, ArtOnFile, CltCreated, StatusID, ContraStat, NewClient, NoSolicit, NoMail, RemoveMail, FGuID, FStatus, Capex, CapexMax, EqTypeFiID, EqTypeID, EquiAqFqID, AcquiPerID, RivalID, NbrUnit, LastQuot, DContract, LastVisit, LastPhone, LastTele, MailingDate, NextVisit, NextCall, RealEstate, HitListIn, HitListOut, DisbLYear, DisbYtd, ChangeTer, HealthSces, HmsDate, HmsUser, ToDelete, DelStatus, DelDate, DelTransit, DelAccMan, DelSynchro, DelReason, NoSolReaso, rowguid from ' + @pub_qualified_name +

    ' Where rowGuid = ''' + convert(char(36), @rowguid) + ''''

    exec(@lsStringToExecute)

    RETURN(0)

    As for the ms resolver search for sp_avgprice on the BOL

Viewing 3 posts - 1 through 2 (of 2 total)

You must be logged in to reply to this topic. Login to reply