Skip to main content

Notifications

Microsoft Dynamics SL (Archived)

Release CA Batch running forever and using up all SQL Resources

(0) ShareShare
ReportReport
Posted on by Microsoft Employee

I have a user that is creating batches in the Cash Account Transfer screen using a source to destination that have never been used before in this order.  When she attempts to release the batch, SQL resources spike and all other users are either frozen or getting errors when trying to process their items in other modules.  Got a copy of the database and running through the process on separate servers, been nearly 2 hours at this point, and seeing the same results.  When look at the process through SQL Trace it almost appears to be going through the CA Integrity Check process of recalculating balances for all accounts and looks like it is trying to run to the end of time (seeing this in the Update cashavgd commands "pernbr= '610702'" with each new command being a higher number.  How can we limit the max pernbr or otherwise correct this?  She has been using this for a couple of months now and hasn't reported this issue before.

Thoughts any?

*This post is locked for comments

  • Community Member Profile Picture
    Community Member Microsoft Employee on at
    RE: Release CA Batch running forever and using up all SQL Resources

    Thank you very much!!!  Had a feeling it was a future date.  Removing the extra 124,000+ records and going to run some test to confirm this works.

  • Verified answer
    Community Member Profile Picture
    Community Member Microsoft Employee on at
    RE: Release CA Batch running forever and using up all SQL Resources

    This is almost always due to a very future period to post which causes a huge number of records in the CashAvgd table.   Delete future period records from this table.

    When you have a current backup:

    Delete from cashavgd where pernbr > '201612' or something similar. Format is yyyymm.

    Then look for the batch that caused this.

    Select * from batch where status = 'U' and perpost >'201504'

  • Apps Mexico Profile Picture
    Apps Mexico 1,090 on at
    RE: Release CA Batch running forever and using up all SQL Resources

    You can open the SQL Profiler and configure a template like this. On Column Filters add an ApplicationName filter with the Cash Account Transfer screen example (%CA01000%).

    After press the Run button, release the batch and you can check which query takes to long. Depends of that, you can take some actions.

    profiler.PNG

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

News and Announcements

Announcing Category Subscriptions!

Quick Links

December Spotlight Star - Muhammad Affan

Congratulations to a top community star!

Top 10 leaders for November!

Congratulations to our November super stars!

Tips for Writing Effective Verified Answers

Best practices for providing successful forum answers ✍️

Leaderboard

#1
André Arnaud de Calavon Profile Picture

André Arnaud de Cal... 291,359 Super User 2024 Season 2

#2
Martin Dráb Profile Picture

Martin Dráb 230,370 Most Valuable Professional

#3
nmaenpaa Profile Picture

nmaenpaa 101,156

Leaderboard

Featured topics

Product updates

Dynamics 365 release plans