Could this be the most common support query we get! …near enough…Usually down to a network interruption and seen most often in Terminal Server enviornments.
The solution is straighforward.
Get all users to exit GP. Note down the Batch ID that is causing the problem.
Open MSSQL and run the following scripts:
SELECT * FROM DYNAMICS..ACTIVITY
SELECT * FROM DYNAMICS..SY00800
SELECT * FROM DYNAMICS..SY00801
SELECT * FROM TEMPDB..DEX_LOCK
SELECT * FROM TEMPDB..DEX_SESSION
If you get answers / results to any of the above, make sure everyone is in fact logged out of GP and then run the following scripts to clear the tables.
Then run the following against the company database:
UPDATE SY00500 SET MKDTOPST=0, BCHSTTUS=0 where BACHNUMB=’XXX’
(Where ‘XXX’ is the batch ID of the batch that is stuck in posting / Reeiving / Busy / Marked etc.)