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 AX (Archived)

ApplySessionFileToClientDatabase encountered Exception

(0) ShareShare
ReportReport
Posted on by 45

Need help in this error 

i am facing this error in 2 retail store(ax 2012 r3) and other stores is working fine just in 2 stores while sync with job 1020 or 1040

ApplySessionFileToClientDatabase encountered Exception. Error Details: Microsoft.Dynamics.Retail.StoreConnect.Request.SQLHandler.ProcessTargetRequestHeaderException: ProcessTargetRequestHeader failed to execute all delete requests ---> Microsoft.Dynamics.Retail.StoreConnect.Request.SQLHandler.ProcessDeleteRequestException: Delete request on table:[ax].[RETAILGROUPMEMBERLINE] failed to execute. ---> Microsoft.Dynamics.Retail.StoreConnect.Request.SQLHandler.RunException: Query: DELETE FROM [ax].[RETAILGROUPMEMBERLINE] ;; filterNameList: ;filterValueList: ; ---> System.Data.SqlClient.SqlException: Timeout expired. The timeout period elapsed prior to completion of the operation or the server is not responding. ---> System.ComponentModel.Win32Exception: The wait operation timed out
--- End of inner exception stack trace ---
at System.Data.SqlClient.SqlInternalConnection.OnError(SqlException exception, Boolean breakConnection, Action`1 wrapCloseInAction)
at System.Data.SqlClient.TdsParser.ThrowExceptionAndWarning(TdsParserStateObject stateObj, Boolean callerHasConnectionLock, Boolean asyncClose)
at System.Data.SqlClient.TdsParserStateObject.ReadSniError(TdsParserStateObject stateObj, UInt32 error)
at System.Data.SqlClient.TdsParserStateObject.ReadSniSyncOverAsync()
at System.Data.SqlClient.TdsParserStateObject.TryReadNetworkPacket()
at System.Data.SqlClient.TdsParserStateObject.TryPrepareBuffer()
at System.Data.SqlClient.TdsParserStateObject.TryReadByte(Byte& value)
at System.Data.SqlClient.TdsParser.TryRun(RunBehavior runBehavior, SqlCommand cmdHandler, SqlDataReader dataStream, BulkCopySimpleResultSet bulkCopyHandler, TdsParserStateObject stateObj, Boolean& dataReady)
at System.Data.SqlClient.SqlCommand.RunExecuteNonQueryTds(String methodName, Boolean async, Int32 timeout, Boolean asyncWrite)
at System.Data.SqlClient.SqlCommand.InternalExecuteNonQuery(TaskCompletionSource`1 completion, String methodName, Boolean sendToPipe, Int32 timeout, Boolean asyncWrite)
at System.Data.SqlClient.SqlCommand.ExecuteNonQuery()
at Microsoft.Dynamics.Retail.StoreConnect.Request.SQLHandler.SCSqlDeleteByFilterRequestRunner.Run(SqlConnection connection, SqlTransaction transaction)
--- End of inner exception stack trace ---
at Microsoft.Dynamics.Retail.StoreConnect.Request.SQLHandler.SCSqlDeleteByFilterRequestRunner.Run(SqlConnection connection, SqlTransaction transaction)
at Microsoft.Dynamics.Retail.StoreConnect.Request.SQLHandler.SCSqlTargetRequestHandler.ProcessDeleteRequest(SqlConnection connection, SqlTransaction transaction)
--- End of inner exception stack trace ---
at Microsoft.Dynamics.Retail.StoreConnect.Request.SQLHandler.SCSqlTargetRequestHandler.ProcessDeleteRequest(SqlConnection connection, SqlTransaction transaction)
at Microsoft.Dynamics.Retail.StoreConnect.Request.SQLHandler.SCSqlTargetRequestHandler.ProcessTargetRequestHeader(ISCTargetRequestHeader targetRequestHeader)
--- End of inner exception stack trace ---
at Microsoft.Dynamics.Retail.StoreConnect.Request.SQLHandler.SCSqlTargetRequestHandler.ProcessTargetRequestHeader(ISCTargetRequestHeader targetRequestHeader)
at Microsoft.Dynamics.Retail.SynchClient.Core.DownloadAgent.ApplySessionFileToClientDatabase(SessionManager sessionMgr, String fileName)Microsoft.Dynamics.Retail.StoreConnect.Request.SQLHandler.ProcessTargetRequestHeaderException: ProcessTargetRequestHeader failed to execute all delete requests ---> Microsoft.Dynamics.Retail.StoreConnect.Request.SQLHandler.ProcessDeleteRequestException: Delete request on table:[ax].[RETAILGROUPMEMBERLINE] failed to execute. ---> Microsoft.Dynamics.Retail.StoreConnect.Request.SQLHandler.RunException: Query: DELETE FROM [ax].[RETAILGROUPMEMBERLINE] ;; filterNameList: ;filterValueList: ; ---> System.Data.SqlClient.SqlException: Timeout expired. The timeout period elapsed prior to completion of the operation or the server is not responding. ---> System.ComponentModel.Win32Exception: The wait operation timed out
--- End of inner exception stack trace ---
at System.Data.SqlClient.SqlInternalConnection.OnError(SqlException exception, Boolean breakConnection, Action`1 wrapCloseInAction)
at System.Data.SqlClient.TdsParser.ThrowExceptionAndWarning(TdsParserStateObject stateObj, Boolean callerHasConnectionLock, Boolean asyncClose)
at System.Data.SqlClient.TdsParserStateObject.ReadSniError(TdsParserStateObject stateObj, UInt32 error)
at System.Data.SqlClient.TdsParserStateObject.ReadSniSyncOverAsync()
at System.Data.SqlClient.TdsParserStateObject.TryReadNetworkPacket()
at System.Data.SqlClient.TdsParserStateObject.TryPrepareBuffer()
at System.Data.SqlClient.TdsParserStateObject.TryReadByte(Byte& value)
at System.Data.SqlClient.TdsParser.TryRun(RunBehavior runBehavior, SqlCommand cmdHandler, SqlDataReader dataStream, BulkCopySimpleResultSet bulkCopyHandler, TdsParserStateObject stateObj, Boolean& dataReady)
at System.Data.SqlClient.SqlCommand.RunExecuteNonQueryTds(String methodName, Boolean async, Int32 timeout, Boolean asyncWrite)
at System.Data.SqlClient.SqlCommand.InternalExecuteNonQuery(TaskCompletionSource`1 completion, String methodName, Boolean sendToPipe, Int32 timeout, Boolean asyncWrite)
at System.Data.SqlClient.SqlCommand.ExecuteNonQuery()
at Microsoft.Dynamics.Retail.StoreConnect.Request.SQLHandler.SCSqlDeleteByFilterRequestRunner.Run(SqlConnection connection, SqlTransaction transaction)
--- End of inner exception stack trace ---
at Microsoft.Dynamics.Retail.StoreConnect.Request.SQLHandler.SCSqlDeleteByFilterRequestRunner.Run(SqlConnection connection, SqlTransaction transaction)
at Microsoft.Dynamics.Retail.StoreConnect.Request.SQLHandler.SCSqlTargetRequestHandler.ProcessDeleteRequest(SqlConnection connection, SqlTransaction transaction)
--- End of inner exception stack trace ---
at Microsoft.Dynamics.Retail.StoreConnect.Request.SQLHandler.SCSqlTargetRequestHandler.ProcessDeleteRequest(SqlConnection connection, SqlTransaction transaction)
at Microsoft.Dynamics.Retail.StoreConnect.Request.SQLHandler.SCSqlTargetRequestHandler.ProcessTargetRequestHeader(ISCTargetRequestHeader targetRequestHeader)
--- End of inner exception stack trace ---
at Microsoft.Dynamics.Retail.StoreConnect.Request.SQLHandler.SCSqlTargetRequestHandler.ProcessTargetRequestHeader(ISCTargetRequestHeader targetRequestHeader)
at Microsoft.Dynamics.Retail.SynchClient.Core.DownloadAgent.ApplySessionFileToClientDatabase(SessionManager sessionMgr, String fileName)

*This post is locked for comments

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

    Hi Bassiony,

    Please try to run Channel configuration job (1070) for these two stores once they completed than try to run 1040 & 1020. It might be possible some tables were not updated successfully for products that's why you are getting below error while syncing product and price jobs.

  • bassiony Profile Picture
    45 on at

    H i  pranav

    thanks,

    i already did that all job is applied without any errors just 1020 and 1040 is making this and today the 3rd store is making the same error and after 5 minutes of the error the job continue transferring the data and its applied

    any help 

  • Rodolfo Recalde Profile Picture
    on at

    Hi,

    The error seems very explicit:

    ...System.Data.SqlClient.SqlException: Timeout expired...

    Some synchronization problems I've already solved related to timeout, the cause was index fragmentation.

    Check index fragmentation:

    • Select ax.RETAILGROUPMEMBERLINE Table
    • Select index, right click, properties (Figure 1 b)
    • Select fragmentation
    • Verify Total Fragmentation  (Figure 1 c)
    • If fragmentation is greater than 10%, you can perform reorganize action, or rebuild (> 25 ~ 30%)

    RetailGroupMemberLine.png

    Figure 1 

    Script to REBUILD all indexes in this table, in channel DB:

    ALTER INDEX ALL on ax.RETAILGROUPMEMBERLINE REBUILD

     

    Review the index fragmentation maintenance plan.

    I Hope this Helps!

    Regards,

    Rodolfo Recalde.

  • bassiony Profile Picture
    45 on at

    Hi Rodolfo

    please find the attachment and tell me 

    what should i do rebuild or recognize that index

    thanksfra.jpg

  • Rodolfo Recalde Profile Picture
    on at

    Hi Bassiony,

    Organized index help keep the response performance in queries.

    You should check with a DBA to maintain the organization of all indexes for all tables in the store database. A daily routine should be scheduled. This way, synchronizations Jobs (1040, 1010...P-0001), and POS calls to the store database will be faster.

    Other issues to consider:

    A. What is your version of POS? CU10, CU11, CU12...?

    B. How many records exist in the table RETAILGROUPMEMBERLINE?

    C. Try create this index:

    GO
    
    /****** Object:  Index [IX_RETAILGROUPMEMBERLINE_PVC]    Script Date: 23/04/2018 11:09:51 ******/
    CREATE NONCLUSTERED INDEX [IX_RETAILGROUPMEMBERLINE_TEST] ON [ax].[RETAILGROUPMEMBERLINE]
    (
    	[VARIANT] ASC,
    	[PRODUCT] ASC,
    	[CATEGORY] ASC
    )
    INCLUDE ( 	[RECID]) WITH (PAD_INDEX = OFF, STATISTICS_NORECOMPUTE = OFF, SORT_IN_TEMPDB = OFF, DROP_EXISTING = OFF, ONLINE = OFF, ALLOW_ROW_LOCKS = ON, ALLOW_PAGE_LOCKS = ON) ON [PRIMARY]
    GO

    Any news, keep us updated.

    I Hope this Helps!

    Regards,

    Rodolfo Recalde

  • bassiony Profile Picture
    45 on at

    Hi Rodolfo

    i will try to make this index.

    i am using cu 8 in pos  and  there is 3339200 records in retailgroupmemberline table

     

    thanks,

     

  • Suggested answer
    Community Member Profile Picture
    on at

    Hello bissony,

    check the column named Description of following table

    INVENTNUMGROUP

    INVENTTABLE

    INVENTTABLEMODULE

    INVENTMODELGROUP

    ECORESPRODUCTTRANSLATION

    ECORESATTRIBUTE

    --

    Thanks

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 AX (Archived)

#1
Martin Dráb Profile Picture

Martin Dráb 4 Most Valuable Professional

#1
Priya_K Profile Picture

Priya_K 4

#3
MyDynamicsNAV Profile Picture

MyDynamicsNAV 2

Last 30 days Overall leaderboard

Featured topics

Product updates

Dynamics 365 release plans