Stuck Batch Correction
One of the most common issues that occur in GP is the issue of a stuck batch. A stuck batch can occur due to connection issues that can occur due to various reasons (Network Issues, Workstation errors, massive data processing etc.). While users can attempt to correct the connection issues, it is likely that at some point users will be forced to deal with a stuck batch resulting from a connection issue, even if for a few seconds.
Identifying a Stuck Batch
A batch in GP typically is has two statuses (Avaliable or No transactions). GP will indicate if a batch is busy. Examples include being edited, posted, printed, or marked for posting. These busy statuses are only brief while a batch is being processed. Allow a few minutes to pass for the below statuses, then try again:
If a batch stays in one of the above states, the user should try to restart GP and check the batch again. If the batch is still stuck with any of the above statuses, the batch is stuck.
Another way to find a stuck batch is to check the Batch Recovery Window. Tools>Routines>Batch Recovery
In some cases, a batch in the Batch Recovery Window will indicate the issue. These would include but are not limited to:
- Posting Interrupted
- Journal Printing Interrupted
- Transaction error-Edit Required
Example of error message that can be received
If you mark the batch and hit continue and receive an error that says the batch is Busy, Marked, or Posting you have as stuck batch.
Correcting a Stuck Batch
Once a batch has been Identified as stuck you will need to correct this issue using SQL. If at this point you have little to no experience with SQL it is time to reach out to a SQL expert. Since running something incorrectly can cause damage to data only do this if you have experience with SQL. Below are the steps needed to be done in SQL.
1.Have all users exit GP
2. Open the SQL Server Management Studio.
3.Create a backup of the database
4.Run SQL Script to validate that everyone is out of system:
SELECT * FROM DYNAMICS..ACTIVITY
SELECT * FROM DYNAMICS..SY00800
SELECT * FROM DYNAMICS..SY00801
SELECT * FROM TEMPDB..DEX_LOCK
SELECT * FROM TEMPDB..DEX_SESSION
5.If no results are returned skip this step. If results are returned validate no one is working on system and run the script:
6.Run the following script against the company database. Replace XXX with the batch number or the name of the batch that you are trying to post or select in Microsoft Dynamics GP.
UPDATE SY00500 SET MKDTOPST=0, BCHSTTUS=0 where BACHNUMB=’XXX’
7.Verify the accuracy of transactions in GP.
8.Verify that you can go into the batch and post.
9.Once you have posted you have corrected the stuck batch.
If you would like some assistance on errors like this or you want more information around Dynamics GP, please feel free to contact Logan Consulting.
Logan Consulting is a professional services firm committed to helping businesses get the most from their QAD SE, QAD EE, MFG/PRO and Microsoft Dynamics AX, Microsoft Dynamics GP and Microsoft Dynamics CRM investments.
Learn More About Our Services
Does it make sense to talk with us? Contact us to start a dialog »
25 Brilliant Ideas to Outsmart Your Competition with Microsoft Dynamics
Top 10 Inventory & Operations Decisions Distributors Are Making Blind