The retail transactions are not pulling from Channel database of one particular store to AX HQ database, so we “reset” the channel database to re-upload all records into a new RPF file, we followed the below steps:
- Stop the AsyncClient in the StoreDB machine
- Make a backup of the Channel Database
- Delete records from table crt.TABLEREPLICATIONLOG
- Start the Async Client
- Run the P-job
After that we found that the P-0001 job was unable to sync the transactions from Channel database of one particular store to the AX database. Whereas at the same time, all the 9999 jobs (sync from AX database to channel database) were working fine and also the P-0001 job (sync from channel database to the AX database) for all remaining store was working fine.
I can see new RPF files is created in upload folder but no change in AX data also CRT.TABLEREPLICATIONLOG table is not populating the records, When I check the Event Viewer in the Channel Database server of that store, I see the below error message:
Failed to upload session data of uploadSessionId 296710 for DataStore with name : 789SDB due to Exception. Error Detail: System.IO.IOException: The process cannot access the file '\\AX-live\AXRetail\upload\789SDB\789SDB-296710-R.rpf' because it is being used by another process.
at System.IO.__Error.WinIOError(Int32 errorCode, String maybeFullPath)
at System.IO.FileStream.Init(String path, FileMode mode, FileAccess access, Int32 rights, Boolean useRights, FileShare share, Int32 bufferSize, FileOptions options, SECURITY_ATTRIBUTES secAttrs, String msgPath, Boolean bFromProxy, Boolean useLongPath, Boolean checkHost)
at System.IO.FileStream..ctor(String path, FileMode mode, FileAccess access, FileShare share)
at Microsoft.Dynamics.Retail.SynchService.DataManager.UploadSessionDataManager.UploadSessionData(String dataStoreName, Int64 uploadSessionId, Byte[] data)System.IO.IOException: The process cannot access the file '\\AX-live\DramaAXRetail\upload\789SDB\789SDB-296710-R.rpf' because it is being used by another process.
at System.IO.__Error.WinIOError(Int32 errorCode, String maybeFullPath)
at System.IO.FileStream.Init(String path, FileMode mode, FileAccess access, Int32 rights, Boolean useRights, FileShare share, Int32 bufferSize, FileOptions options, SECURITY_ATTRIBUTES secAttrs, String msgPath, Boolean bFromProxy, Boolean useLongPath, Boolean checkHost)
at System.IO.FileStream..ctor(String path, FileMode mode, FileAccess access, FileShare share)
at Microsoft.Dynamics.Retail.SynchService.DataManager.UploadSessionDataManager.UploadSessionData(String dataStoreName, Int64 uploadSessionId, Byte[] data)
We followed the below steps:
- Clearing the RPF files out of the upload working folder
- Truncate the RETAILCDXUPLOADSESSION out of the AX DB
- Truncate the CRT.TABLEREPLICATIONLOG in the Store DB.
- Install again Async Client service, with a new message DB.
- Create channel data group
- Create a copy of P-001 job
- Sync Metadata after changing the job,