Order Database Cleanup


Before going live, it's nice to have a clean start with your orders database. Here are some ways you can do that.

Note: These instructions and script were written for version 3.2.

To get rid of all orders, you can use the attached script. Keep in mind this doesn't touch the order number, so you'd need to manually set that (in the hibernate_unique_key table, see this article for more details) if you want that reset as well.

If you want to be selective about which orders to delete, you'll have to do a bit more work (we don't currently offer a script like this).

Another option is to completely drop and re-create the entire Active Commerce database. Just be aware that this will also clear ProductStock and WishList tables, which might not be desired. To do that:

  • Go to the database utility: <site>/sitecore/admin/databaseutility.aspx
  • Click "Drop Schema" (click "OK" to the warning)
  • Click "Create Schema"
Have more questions? Submit a request