web
You’re offline. This is a read only version of the page.
close
Skip to main content

Notifications

Announcements

No record found.

Community site session details

Community site session details

Session Id :
Microsoft Dynamics SL (Archived)

Posting AP Voucher sometimes gives SQL Error "Sql Server Msg 93 - connection is busy with results for another command"

(0) ShareShare
ReportReport
Posted on by 420

Using SL2011 and SQL2008, we get this message sporadically.   I've seen other posts like this one and applied all the suggestions.

We tried the FRX fix which adds the (Set No Count ON).

We reviewed our 3 custom triggers and some third party product (Renown) triggers for locks (setting with (nolock) where appropriate).

We still get the following messages:

Microsoft Sql Sever Native client 10.0] Connection busy with results for another command. 

Debugging info:Batch_mod_rlsed '030224', 'AP'

Cursor(c_batch) Batch_Mod_Rlsed'030224', 'AP'

optional info: SqlState = HY000 Native Error = 0 ErrorMsg = Microsoft Sql Sever Native client 10.0] Connection busy with results for another command.  pcbErrorMsg = 93

ODBCRowNumber =-1 Column =-1 SSrvrLine = 0 SSrvrMsgState=0 SsrvrSeverity  = 0 SsrverProcname = SsrvrSrvname =

Any other help would be great.

*This post is locked for comments

I have the same question (0)
  • Suggested answer
    Community Member Profile Picture
    on at

    there is a hot fix for this issue.  It happens when you have FRx installed with its triggers.  Download B2551470_FRx_SL2011.

    If you cannot find the hot fix, it is a SQL script that needs to be run.  Here is the script:

    --delete from frl_acct_code    

    alter trigger frx_frl_acct_code_insert  

    on frl_acct_code  

    For Insert  

    as  

    Begin  

     SET NOCOUNT ON  

    If ((select count(*) from inserted) = 0) goto eof  

     DECLARE @MaxSegs int  

     DECLARE @NatSegLen tinyint  

     DECLARE @SegLen2 tinyint  

     DECLARE @SegLen3 tinyint  

     DECLARE @SegLen4 tinyint  

     DECLARE @SegLen5 tinyint  

     DECLARE @SegLen6 tinyint  

     DECLARE @SegLen7 tinyint  

     DECLARE @SegLen8 tinyint  

     DECLARE @SegLen9 tinyint  

     DECLARE @SubLen tinyint  

       SELECT @MaxSegs = NumberSegments + 1,  

              @SegLen2 = SegLength00,  

              @SegLen3 = SegLength01,  

              @SegLen4 = SegLength02,  

              @SegLen5 = SegLength03,  

              @SegLen6 = SegLength04,  

              @SegLen7 = SegLength05,  

              @SegLen8 = SegLength06,  

              @SegLen9 = SegLength07,  

              @SubLen = SegLength00 + SegLength01 + SegLength02 + SegLength03 +  

                        SegLength04 + SegLength05 + SegLength06 + SegLength07  

        FROM FlexDef  

        WHERE FieldClassName = 'SUBACCOUNT'  

    select @NatSegLen = nat_seg_len  from frl_glx_ctrl  

    update frl_acct_code set  

               Acct_Code = substring(Acct, 1, @NatSegLen) + substring(Sub, 1, @SubLen)  

               ,nat_seg_code = substring(acct, 1, @NatSegLen)  

      ,seg01_code =substring(Acct, 1, @NatSegLen)  

               ,seg02_code =  substring(Sub, 1, @SegLen2)  

               ,seg03_code = substring(Sub, 1 + @SegLen2, @SegLen3)  

      ,seg04_code =substring(Sub, 1 + @SegLen2 + @SegLen3, @SegLen4)  

               ,seg05_code =substring(Sub, 1 + @SegLen2 + @SegLen3 + @SegLen4, @SegLen5)  

               ,seg06_code = substring(Sub, 1 + @SegLen2 + @SegLen3 + @SegLen4 + @SegLen5, @SegLen6)  

               ,seg07_code = substring(Sub, 1 + @SegLen2 + @SegLen3 + @SegLen4 + @SegLen5 + @SegLen6, @SegLen7)  

            ,seg08_code = substring(Sub, 1 + @SegLen2 + @SegLen3 + @SegLen4 + @SegLen5 + @SegLen6 + @SegLen7, @SegLen8)  

               ,seg09_code = substring(Sub, 1 + @SegLen2 + @SegLen3 + @SegLen4 + @SegLen5 + @SegLen6 + @SegLen7 + @SegLen8, @SegLen9)  

    from frl_acct_code where entity_num = -255  

    if (select top 1 ValidateAcctSub from GLSetup WITH (nolock)) = 1  

               begin  

                   update frl_acct_code set  

                   acct_status =  

                   CASE  

                       WHEN active = 1 THEN 0  

                       WHEN active = 0 THEN 1  

                   END,  

                   acct_desc = descr  

                  FROM frl_acctsub_view  

                  WHERE frl_acctsub_view.acct = frl_acct_code.acct  

                  AND frl_acctsub_view.sub = frl_acct_code.sub  

                  AND frl_acctsub_view.cpnyid = frl_acct_code.cpnyid  

                  AND frl_acct_code.entity_num = -255  

               -- try and update fields from frl_acctsub_view  

               update frl_acct_code set  

               acct_status =  

                           CASE  

                   WHEN active = 1 THEN 0  

                   WHEN active = 0 THEN 1  

                             END,  

               acct_desc = descr  

               FROM account  

               WHERE account.acct = frl_acct_code.acct  

               and frl_acct_code.acct_status = 255  

               and entity_num = -255  

               --now for account group/normal_bal rule  

               update frl_acct_code set  

           normal_bal =  

                             case  

                               when substring(accttype, 2, 1) = 'A' THEN 1  

                               when substring(accttype, 2, 1) = 'E' THEN 1  

                               when substring(accttype, 2, 1) = 'L' THEN 2  

                               when substring(accttype, 2, 1) = 'I' THEN 2  

                             end,  

                           acct_group=  

                             case  

                               when substring(accttype, 2, 1) = 'A' THEN 1  

                               when substring(accttype, 2, 1) = 'L' THEN 2  

                               when substring(accttype, 2, 1) = 'E' THEN 3  

                               when substring(accttype, 2, 1) = 'I' THEN 4  

                    end  

                            from account  

                            where account.acct = frl_acct_code.acct  

                            and frl_acct_code.entity_num = -255  

                           update frl_acct_code set acct_group = 1,normal_bal = 1 where frl_acct_code.normal_bal =0  

               END  

    else --if (select ValidateAcctSub from GLSetup WITH (nolock)) = 1  

    begin  

               UPDATE frl_acct_code set  

               acct_status =  

                 CASE  

               WHEN active = 1 THEN 0  

                   WHEN active = 0 THEN 1  

                 END,  

               acct_desc = descr,  

               normal_bal =  

                 CASE  

               WHEN substring(accttype, 2, 1) = 'A' THEN 1  

               WHEN substring(accttype, 2, 1) = 'E' THEN 1  

               WHEN substring(accttype, 2, 1) = 'L' THEN 2  

               WHEN substring(accttype, 2, 1) = 'I' THEN 2  

                             END,  

               acct_group =  

                           CASE  

        WHEN substring(accttype, 2, 1) = 'A' THEN 1  

        WHEN substring(accttype, 2, 1) = 'L' THEN 2  

        WHEN substring(accttype, 2, 1) = 'E' THEN 3  

        WHEN substring(accttype, 2, 1) = 'I' THEN 4  

                           END  

     from account  

     where account.acct = frl_acct_code.acct and entity_num = -255 and acct_status = 255  

    end  

    delete from frl_acct_code where len(rtrim(sub)) > @SubLen and entity_num = -255  

    update frl_acct_code set entity_num =isnull(( select  entity_num from frl_entity  where frl_entity.cpnyid = frl_acct_code.CpnyID),-1) where entity_num = -255  

    eof:  

    --SET NOCOUNT OFF  

    END  

    go

    alter trigger frx_gltran_insert  

    on gltran  

    for insert, update  

    as  

     begin  

     SET NOCOUNT ON  

      insert frl_acct_code (  

    acct,acct_code,acct_desc,acct_group,acct_status,cpnyid,  

    entity_num,nat_seg_code,normal_bal,  

    seg01_code,seg02_code,seg03_code,seg04_code,seg05_code,seg06_code,seg07_code,seg08_code,seg09_code,sub)  

    select  distinct t1.acct,' ', ' ' , 0 ,  255    

    , t1.cpnyid  

    , -255  , ' ' ,  0 , ' ' , ' '  

    , ' ' , ' ' , ' ' , ' ' , ' ' , ' ' , ' ' , t1.sub    from inserted t1    

    left join frl_acct_code t2  

                  on t1.cpnyid = t2.cpnyid and t1.acct = t2.acct and t1.sub = t2.sub  

    WHERE t1.posted = 'U' and rlsed = 1 and t2.acct is null  

    --SET NOCOUNT OFF  

    END  

  • Verified answer
    Mark Fineman Profile Picture
    420 on at

    We found the answer after running many a SQL Trace.

    SL2011 and SQL2008R2 don't like "SET NO COUNT OFF" statements in triggers linked to the batch release process.  We had a third party product - RENOWN's VAT product - which had the line "SET NO COUNT OFF" in 3 triggers.

    Once these were removed and we checked all our custom triggers on the Acct and GLTran tables, the SQL error messages dissappeared.  

Under review

Thank you for your reply! To ensure a great experience for everyone, your content is awaiting approval by our Community Managers. Please check back later.

Helpful resources

Quick Links

Responsible AI policies

As AI tools become more common, we’re introducing a Responsible AI Use…

Neeraj Kumar – Community Spotlight

We are honored to recognize Neeraj Kumar as our Community Spotlight honoree for…

Leaderboard > 🔒一 Microsoft Dynamics SL (Archived)

Last 30 days Overall leaderboard

Featured topics

Product updates

Dynamics 365 release plans