Run Manifest Purge Script from Epicor?

We have one VM App server (running Live, Pilot, Test) and one VM DB server (running Live, Pilot, Test, and a single live Manifest 4 DB).

We have upgraded Pilot to 10.2.400.x and are testing it. During testing, Manifest throws an error (It seems that the pack list in Pilot is conflicting with the already entered pack list from live). The resolution from Epicor is to run the below purge script (which will wipe my live Manifest tables, correct?). Does this seem like a wise thing to do? Does it matter that I wipe Manifest with this script?


declare @createdate DateTime = ‘7/07/2020 12:00:00 AM’

delete Container where [ShipmentId] in (select ShipmentId from Shipment where CreateDate < @createdate)
delete ShipmentLine where ShipmentId in (select ShipmentId from Shipment where CreateDate < @createdate)
delete ShipmentCarrierOption where ShipmentId in (select ShipmentId from Shipment where CreateDate < @createdate)
delete ShipmentHistory where ShipmentId in (select ShipmentId from Shipment where CreateDate < @createdate)
delete BOLLine where [BOLHeaderId] in (select BOLHeaderId from BOLHeader where PrimaryShipmentId in(select ShipmentId from Shipment where CreateDate < @createdate))
delete BOLHeader where PrimaryShipmentId in(select ShipmentId from Shipment where CreateDate < @createdate)
delete ShipmentAllocation where ShipmentId in(select ShipmentId from Shipment where CreateDate < @createdate)
delete ContainerContent where [ContainerId] in (select ContainerId from Container where [ShipmentId] in (select ShipmentId from Shipment where CreateDate < @createdate))
delete ContainerContentDetail where [ContainerContentId] in (select ContainerContentId from ContainerContent where [ContainerId] in (select ContainerId from Container where [ShipmentId] in (select ShipmentId from Shipment where CreateDate < @createdate)))
delete Shipment where CreateDate < @createdate


I would not suggest to run the script against your LIVE Manifest tables - then you loose all history of your shipments and search of those shipments in Manifest. Do you have separate DB for TEST manifest and LIVE manifest?

We have ran this script against our TEST manifest db several times after we make a TEST update so we can continue testing without running into shipment ids being the same in test and live.

We do not have a separate test DB for Manifest. I wasn’t involved in setting up these servers or dbs, so I’m not exactly sure what to do to get a test Manifest db.

Question though, do we need the history in Manifest? Won’t shipping history all be in the Epicor DB?

That depends. If you ship internationally you won’t have the international paperwork available. do you do any misc shipments directly from Manifest? If so they will be gone.
Ship Support should be able to help with a TEST DB so you can separate transactions. Another option is to ask Support if they can change the shipment id number in your database to a larger number that won’t conflict with either of your systems.

In the end you need to review based on your company needs if it is a good thing to purge the live data for your testing or not.

1 Like