1)  Have all users exit Dynamics GP before running a SQL backup.

2)  Run the below SQL query and if any rows of data are returned then go to step 3, if no data is returned go to step 4.

          SELECT * FROM DYNAMICS..ACTIVITY
          SELECT * FROM DYNAMICS..SY00800
          SELECT * FROM DYNAMICS..SY00801
          SELECT * FROM TEMPDB..DEX_LOCK
          SELECT * FROM TEMPDB..DEX_SESSION

3) Run the below SQL query to remove the data from the tables.

DELETE DYNAMICS..ACTIVITY
         DELETE DYNAMICS..SY00800
         DELETE DYNAMICS..SY00801
         DELETE TEMPDB..DEX_LOCK
         DELETE TEMPDB..DEX_SESSION

4) Run the below SQL query 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'
  1. Note The value of BACHNUMB is the same as the value of the Batch ID window in Microsoft Dynamics GP