Uploaded image for project: 'CFA MX '
  1. CFA MX
  2. CFAMX-14140

CDS Export failures due to the following exception "could not execute batch command.[SQL: SQL not available]".

    Details

    • Type: Customer Defect
    • Status: Done (View Workflow)
    • Priority: Major
    • Resolution: Closed/Resolved by Caller
    • Affects Version/s: CFA 2021R2
    • Fix Version/s: None
    • Component/s: None
    • Labels:
      None
    • VTask #:
      VTASK0450238
    • Root cause - Reason:
      Undetermined
    • Root Cause:
      NA

      Description

      Description

      CDS Export failures due to the following exception "could not execute batch command.[SQL: SQL not available]"
      Environment : PROD
      Store : Multiple stores, example 03830

       Steps
      1. Re-export CDS for store 03830 businessday of 3/31/2021

      2. select * from tbExportQueueMessage with (nolock)
      where BusinessDay >= '20210325'
      and XSLTExportTaskID = 124
      and Status = 2
      and StoreNumber=03830
      and comment like '%could not execute batch command%'
      order by businessday desc

      3. begin tran
      update tbExportQueueMessage
      set Status = -1, RetryCount = 0
      where XSLTQueueExportID in (144363027) and entityid = 4913

      Results : CDS exports failing with message could not execute batch command.[SQL: SQL not available]

      Expected : For the CDS to successfully export

       

      select * from tbExportQueueMessage with (nolock)
      where BusinessDay >= '20210325'
      and XSLTExportTaskID = 124
      and Status = 2
      and comment like '%could not execute batch command%'
      order by businessday desc

       

      --Example store 03830

      SELECT *
      FROM tbaudit with (NOLOCK)
      WHERE AuditDateTime > GETDATE()-9
      and EventEntityID=4913
      and AuditDetails like '%cash day%'

      CFA Cash Day Summary export for destination Send to WebService of type Webservice failed for store : 03830 retry count : 4 with exception: NHibernate.Exceptions.GenericADOException: could not execute batch command.[SQL: SQL not available] ---> System.Data.SqlClient.SqlException: The UPDATE statement conflicted with the FOREIGN KEY constraint "FK_OnAccountSale". The conflict occurred in database "Chick-fil-a", table "dbo.tbOnAccountSale", column 'OnAccountSaleId'. The UPDATE statement conflicted with the FOREIGN KEY constraint "FK_OnAccountSale". The conflict occurred in database "Chick-fil-a", table "dbo.tbOnAccountSale", column 'OnAccountSaleId'. The UPDATE statement conflicted with the FOREIGN KEY constraint "FK_OnAccountSale". The conflict occurred in database "Chick-fil-a", table "dbo.tbOnAccountSale", column 'OnAccountSaleId'. The UPDATE statement conflicted with the FOREIGN KEY constraint "FK_OnAccountSale". The conflict occurred in database "Chick-fil-a", table "dbo.tbOnAccountSale", column 'OnAccountSaleId'. The statement has been terminated. The statement has been terminated. The statement has been terminated. The statement has been terminated. at System.Data.SqlClient.SqlConnection.OnError(SqlException exception, Boolean breakConnection) at System.Data.SqlClient.TdsParser.ThrowExceptionAndWarning(TdsParserStateObject stateObj) at System.Data.SqlClient.TdsParser.Run(RunBehavior runBehavior, SqlCommand cmdHandler, SqlDataReader dataStream, BulkCopySimpleResultSet bulkCopyHandler, TdsParserStateObject stateObj) at System.Data.SqlClient.SqlCommand.FinishExecuteReader(SqlDataReader ds, RunBehavior runBehavior, String resetOptionsString) at System.Data.SqlClient.SqlCommand.RunExecuteReaderTds(CommandBehavior cmdBehavior, RunBehavior runBehavior, Boolean returnStream, Boolean async) at System.Data.SqlClient.SqlCommand.RunExecuteReader(CommandBehavior cmdBehavior, RunBehavior runBehavior, Boolean returnStream, String method, DbAsyncResult result) at System.Data.SqlClient.SqlCommand.InternalExecuteNonQuery(DbAsyncResult result, String methodName, Boolean sendToPipe) at System.Data.SqlClient.SqlCommand.ExecuteNonQuery() at System.Data.SqlClient.SqlCommandSet.ExecuteNonQuery() at NHibernate.AdoNet.SqlClientBatchingBatcher.DoExecuteBatch(IDbCommand ps) — End of inner exception stack trace — at NHibernate.AdoNet.SqlClientBatchingBatcher.DoExecuteBatch(IDbCommand ps) at NHibernate.AdoNet.AbstractBatcher.ExecuteBatchWithTiming(IDbCommand ps) at NHibernate.AdoNet.AbstractBatcher.ExecuteBatch() at NHibernate.Engine.ActionQueue.ExecuteActions(IList list) at NHibernate.Engine.ActionQueue.ExecuteActions() at NHibernate.Event.Default.AbstractFlushingEventListener.PerformExecutions(IEventSource session) at NHibernate.Event.Default.DefaultFlushEventListener.OnFlush(FlushEvent event) at NHibernate.Impl.SessionImpl.Flush() at NHibernate.Transaction.AdoTransaction.Commit() at Mx.XsltExports.Data.XsltExportDestinationQueueRepository.MarkDestinationAsExported(Int64 xsltQueueExportId, Int64 xsltExportDestinationId) at Mx.XsltExports.Services.XsltExportDestinationService.SendReportToDestination(XsltExportDestination destination, CachedReport report, Nullable`1 queueExportId, String reportLocation, Boolean archiveFileAfterSending) at Mx.Services.XSLTExportServiceClass.SendXsltDestinationSenders(IList`1 destinationSenders, CachedReport report)

        Attachments

          Issue Links

            Activity

              People

              • Assignee:
                jason.powell Jason Powell
                Reporter:
                Robert.Johnson Robert Johnson (Inactive)
              • Watchers:
                1 Start watching this issue

                Dates

                • Created:
                  Updated:
                  Resolved:

                  PagerDuty

                  Error rendering 'com.pagerduty.jira-server-plugin:PagerDuty'. Please contact your Jira administrators.