Click here to monitor SSC
SQLServerCentral is supported by Red Gate Software Ltd.
 
Log in  ::  Register  ::  Not logged in
 
 
 
        
Home       Members    Calendar    Who's On


Add to briefcase

Could not complete cursor operation because the table schema changed after the cursor was declared => Dynamics AX Expand / Collapse
Author
Message
Posted Tuesday, May 11, 2010 2:44 AM
Forum Newbie

Forum NewbieForum NewbieForum NewbieForum NewbieForum NewbieForum NewbieForum NewbieForum Newbie

Group: General Forum Members
Last Login: Friday, March 30, 2012 5:22 AM
Points: 3, Visits: 13
Hello,

Until last week, we ran Microsoft’s ERP software Dynamics AX4.0 on SQL 2005 SP3 (x86).
We upgraded to a new VMWare environment with SQL2008SP1 x64 (hosted on a Windows 2008 R2 server).

Since we did the upgrade we receive following error message at random times in AX:
Could not complete cursor operation because the table schema has been changed after the cursor was declared

For example:
Object Server 01: The database reported (session 37 (cdgre)): [Microsoft][ODBC SQL Server Driver][SQL Server]Could not complete cursor operation because the
table schema changed after the cursor was declared.. The SQL statement was: "SELECT A.SALESID,A.LINENUM,A.ITEMID,A.SALESSTATUS,A.LEDGERACCOUNT,A.NAME,A.EXTERNALITEMID,A.TAXGROUP,A.QTYORDERED,A.SALESDELIVERNOW,A.REMAINSALESPHYSICAL,A.REMAINSALESFINANCIAL,A.COSTPRICE,A.SALESPRICE,A.CURRENCYCODE,A.LINEPERCENT,A.LINEDISC,A.LINEAMOUNT,A.CONFIRMEDDLV,A.RESERVATION,A.SALESGROUP,A.SALESUNIT,A.DIMENSION,A.DIMENSION2_,A.DIMENSION3_,A.DIMENSION4_,A.DIMENSION5_,A.PRICEUNIT,A.PROJTRANSID,A.INVENTTRANSID,A.CUSTGROUP,A.CUSTACCOUNT,A.INTERCOMPANYRETURNACTIONID,A.SALESQTY,A.SALESMARKUP,A.INVENTDELIVERNOW,A.MULTILNDISC,A.MULTILNPERCENT,A.SALESTYPE,A.BLOCKED,A.COMPLETE,A.REMAININVENTPHYSICAL,A.TRANSACTIONCODE,A.COUNTYORIGDEST,A.INTERCOMPANYRETURNACTIONTXT,A.TAXITEMGROUP,A.TAXAUTOGENERATED,A.UNDERDELIVERYPCT,A.OVERDELIVERYPCT,A.BARCODE,A.BARCODETYPE,A.INVENTREFTRANSID,A.INVENTREFTYPE,A.INVENTREFID,A.INTERCOMPANYORIGIN,A.DELIVERYDATECONTROL,A.ITEMBOMID,A.ITEMROUTEID,A.LINEHEADER,A.SCRAP,A.RETURNACTIONID,A.DLVMODE,A.INVENTTRANSIDRETURN,A.PROJCATEGORYID,A.PROJID,A.INVENTDIMID,A.TRANSPORT,A.STATPROCID,A.DEL_ESTIMATEGROSS,A.DEL_ESTIMATENET,A.PORT,A.PROJLINEPROPERTYID,A.RECEIPTDATEREQUESTED,A.CUSTOMERLINENUM,A.PACKINGUNITQTY,A.PACKINGUNIT,A.INTERCOMPANYINVENTTRANSID,A.DELIVERYADDRESS,A.DELIVERYNAME,A.DELIVERYSTREET,A.DELIVERYZIPCODE,A.DELIVERYCITY,A.DELIVERYCOUNTY,A.DELIVERYSTATE,A.DELIVERYCOUNTRYREGIONID,A.DELIVERYTYPE,A.CUSTOMERREF,A.PURCHORDERFORMNUM,A.RECEIPTDATECONFIRMED,A.BLANKETREFTRANSID,A.STATTRIANGULARDEAL,A.SHIPPINGDATEREQUESTED,A.SHIPPINGDATECONFIRMED,A.ADDRESSREFRECID,A.ADDRESSREFTABLEID,A.ITEMTAGGING,A.CASETAGGING,A.PALLETTAGGING,A.EINVOICEACCOUNTCODE,A.WM_BE_VENDACCOUNT,A.WM_BE_PURCHPRICE,A.WM_BE_PROJACTIVITYID,A.WM_BE_LENDJOURNALID,A.DEL_WM_BE_INOUTBOUNDREFRECID,A.WM_BE_INOUTBOUNDINVENTTRANSID,A.QBE_MARGE,A.QBE_IMPORTANTNOTE,A.QBE_RECEIPTDATEESTIMATED,A.QBE_SHIPDATEESTIMATED,A.QBE_PURCHCURRENCYCODE,A.QBE_PURCHEXCHRATE,A.QBE_ORDERDATECUSTOMER,A.QBE_ORDERRECEIVEDCS,A.QBE_INVOICEDATE,A.QBE_INVOICECREDITDEBIT,A.QBE_ISFORECAST,A.QBE_INVENTTRANSIDRMA,A.QBE_PURCHEXCHRATEDATE,A.QBE_FIXQUOTQTY,A.QBE_FIXQUOTSALESPRICE,A.QBE_FIXQUOTDLVTIME,A.QBE_FIXQUOTPURCHEXCHRATEDATE,A.QBE_FIXQUOTPURCHEXCHRATE,A.QBE_FIXQUOTCTPURCHPRICE,A.QBE_FIXQUOTCTVENDACCOUNT,A.QBE_FIXQUOTCTVENDDISCOUNTCODE,A.QBE_FIXQUOTCTDISCOUNTPERC30028,A.QBE_FIXQUOTCTDLVMODEID,A.QBE_FIXQUOTCTDELIVERYPERC30030,A.QBE_FIXQUOTCTINTERNALCHAR30031,A.QBE_FIXQUOTCTINTERNALCHAR30032,A.QBE_FIXQUOTCTSALESMARGIN,A.QBE_FIXQUOTCTCOSTPRICE,A.QBE_FIXQUOTCTSALESPRICE,A.QBE_FIXQUOTCTCURRENCYCODE,A.QBE_FIXQUOTCTPURCHCURRENCYCODE,A.QBE_FIXQUOTCTCALCEXECUTED,A.QBE_FIXQUOTCTPURCHPRICEPU30039,A.QBE_FIXQUOTCTPURCHCURR,A.QBE_FIXQUOTCTPURCHASEPRICEUNIT,A.QBE_FIXQUOTCTSALESPRICEUNIT,A.QBE_FIXQUOTCTCOSTPRICEGROSS,A.QBE_FIXQUOTCTSALESQTY,A.QBE_PURCHDLVMODEID,A.QBE_ISVOUCHERITEM,A.QBE_ISSPECIALCARE,A.QBE_ADVICEMARGEPERCENT,A.QBE_NUMOFCHANGESREQUESTED30049,A.QBE_RECEIPTDATEREQUESTEDO30050,A.QBE_PRICEDISCRECID,A.QBE_INTRACODE,A.ISSM_LINEAMOUNTMST,A.ISSM_FIXLOWMARGINAPPROVED40002,A.ISSM_FIXLOWMARGINAPPROVEDTIME,A.ISSM_FIXLOWMARGINAPPROVEDDATE,A.ISSM_FIXLOWMARGINAPPROVEDBY,A.ISSM_FIXLOWMARGINAPPROVED,A.ISSM_LOWMARGINAPPROVEDREASON,A.ISSM_LOWMARGINAPPROVEDTIME,A.ISSM_LOWMARGINAPPROVEDDATE,A.ISSM_LOWMARGINAPPROVEDBY,A.ISSM_LOWMARGINAPPROVED,A.ISSM_NONCOMPLIANCEAPPROVED,A.ISSM_NONCOMPLIANCEAPPROVEDTIME,A.ISSM_NONCOMPLIANCEAPPROVEDDATE,A.ISSM_NONCOMPLIANCEAPPROVEDBY,A.MODIFIEDDATE,A.CREATEDDATE,A.RECVERSION,A.RECID,B.SALESID,B.SALESNAME,B.RESERVATION,B.CUSTACCOUNT,B.INVOICEACCOUNT,B.DELIVERYDATE,B.DELIVERYADDRESS,B.URL,B.PURCHORDERFORMNUM,B.SALESTAKER,B.SALESGROUP,B.FREIGHTSLIPTYPE,B.DOCUMENTSTATUS,B.INTERCOMPANYORIGINALSALESID,B.CURRENCYCODE,B.PAYMENT,B.CASHDISC,B.TAXGROUP,B.LINEDISC,B.CUSTGROUP,B.DISCPERCENT,B.INTERCOMPANYORIGINALCUSTACCO22,B.DIMENSION,B.DIMENSION2_,B.DIMENSION3_,B.DIMENSION4_,B.DIMENSION5_,B.PRICEGROUPID,B.MULTILINEDISC,B.ENDDISC,B.CUSTOMERREF,B.COUNTYORIGDEST,B.LISTCODE,B.DLVTERM,B.DLVMODE,B.PURCHID,B.SALESSTATUS,B.MARKUPGROUP,B.SALESTYPE,B.SALESPOOLID,B.POSTINGPROFILE,B.TRANSACTIONCODE,B.INTERCOMPANYAUTOCREATEORDERS,B.INTERCOMPANYDIRECTDELIVERY,B.INTERCOMPANYDIRECTDELIVERYORIG,B.DELIVERYZIPCODE,B.DELIVERYCOUNTY,B.DELIVERYCOUNTRYREGIONID,B.SETTLEVOUCHER,B.DELIVERYSTATE,B.ENTERPRISENUMBER,B.INTERCOMPANYALLOWINDIRECTCRE48,B.INTERCOMPANYALLOWINDIRECTCRE49,B.DELIVERYNAME,B.ONETIMECUSTOMER,B.COVSTATUS,B.COMMISSIONGROUP,B.PAYMENTSCHED,B.INTERCOMPANYORIGIN,B.EMAIL,B.FREIGHTZONE,B.RETURNITEMNUM,B.CASHDISCPERCENT,B.CONTACTPERSONID,B.DEADLINE,B.PROJID,B.INVENTLOCATIONID,B.ADDRESSREFTABLEID,B.VATNUM,B.PORT,B.INCLTAX,B.EINVOICELINESPEC,B.NUMBERSEQUENCEGROUP,B.FIXEDEXCHRATE,B.LANGUAGEID,B.AUTOSUMMARYMODULETYPE,B.GIROTYPE,B.SALESORIGINID,B.ESTIMATE,B.TRANSPORT,B.PRINTMODULETYPE,B.PAYMMODE,B.PAYMSPEC,B.FIXEDDUEDATE,B.DELIVERYCITY,B.DELIVERYSTREET,B.EXPORTREASON,B.STATPROCID,B.BANKCENTRALBANKPURPOSETEXT,B.DEL_REFDLVZIPCODE,B.INTERCOMPANYCOMPANYID,B.INTERCOMPANYPURCHID,B.INTERCOMPANYORDER,B.DLVREASON,B.QUOTATIONID,B.DELIVERYDATECONTROL,B.RECEIPTDATEREQUESTED,B.RECEIPTDATECONFIRMED,B.SHIPPINGDATEREQUESTED,B.SHIPPINGDATECONFIRMED,B.BANKCENTRALBANKPURPOSECODE,B.DEL_CORRECTEDINVOICEID,B.DEL_PARENTSALESID,B.EINVOICEACCOUNTCODE,B.ITEMTAGGING,B.CASETAGGING,B.PALLETTAGGING,B.ADDRESSREFRECID,B.SALESRESPONSIBLE,B.SALESUNITID,B.SMMSALESAMOUNTTOTAL,B.SMMCAMPAIGNID,B.WM_BE_USECURRENCY,B.QBE_BOLCARRIERNAME,B.QBE_RECEIPTDATEESTIMATED,B.QBE_SHIPDATEESTIMATED,B.QBE_BLOCKED,B.QBE_BLOCKUSERID,B.QBE_MAXRATEDIFFERENCE,B.QBE_PRINTCURRENCYCLAUSE,B.QBE_CONTRACT,B.QBE_BOLCARRIERACCOUNTNUM,B.QBE_LICENCENAME,B.QBE_ORDERDATECUSTOMER,B.QBE_ORDERRECEIVEDCS,B.QBE_ISNRC,B.QBE_CLAUSEEXCHRATE,B.QBE_ISINTERNAL,B.QBE_DESTINATIONCODEID,B.QBE_SHIPMENTPORTID,B.QBE_FIXQUOTATIONID,B.QBE_FIXQUOTCUSTOMERREF,B.QBE_FIXQUOTCURRENCYCODE,B.QBE_SONOTAPPROVED,B.QBE_ISSPECIALCARE,B.QBE_NOTRANSPORTCHARGES,B.ISSM_SECONDCHECK,B.MODIFIEDDATE,B.MODIFIEDBY,B.CREATEDDATE,B.CREATEDTIME,B.CREATEDBY,B.RECVERSION,B.RECID,A.DEL_CORRECTIVEREASON,B.DEL_CORRECTIVEREASON,B.QBE_FIXQUOTPAYMTERMDESCR,B.QBE_FIXQUOTDLVTERMDESCR FROM SALESLINE A,SALESTABLE B WHERE (A.DATAAREAID=N'txb') AND ((B.DATAAREAID=N'txb') AND ((B.SALESID=A.SALESID) AND ((B.INTERCOMPANYORDER=0) AND (B.INTERCOMPANYCOMPANYID=' '))))"

We set the “Max degree of parallelism” setting in SQL server to 1, according to a guideline from Microsoft for Dynamics AX.
We also have SQL Replication running on the database.
Could these settings be conflicting each other?

thanks in advance,

kind regards

Wim Van Hoof
Post #919519
Posted Thursday, July 08, 2010 8:06 AM
Forum Newbie

Forum NewbieForum NewbieForum NewbieForum NewbieForum NewbieForum NewbieForum NewbieForum Newbie

Group: General Forum Members
Last Login: Friday, November 08, 2013 5:15 AM
Points: 1, Visits: 16
I have had the same error occurring in my system. It's not Dynamics though. I found that a maintenance plan was causing it. Indexes and statistics were being rebuild and at that time the error occurred..

SQL_ERROR:SQLFetch -1 [16943] {37000} [Microsoft][ODBC SQL Server Driver][SQL Server]Could not complete cursor operation because the table schema changed after the cursor was declared. select ts_wound ts_create from invent_hist where unit_id = ?

Kind regards
Herb Levering
Post #949308
Posted Thursday, July 08, 2010 8:25 AM
Forum Newbie

Forum NewbieForum NewbieForum NewbieForum NewbieForum NewbieForum NewbieForum NewbieForum Newbie

Group: General Forum Members
Last Login: Friday, March 30, 2012 5:22 AM
Points: 3, Visits: 13
Thanks for the reply.
We discovered it was SQL Transaction replication which caused the issues in our case.

We scheduled the snapshot replicaton agent now to run once in the morning. And transaction replication agent runs continuously during the day.
Post #949333
« Prev Topic | Next Topic »

Add to briefcase

Permissions Expand / Collapse