We are able to delete a company in AX, but deleting a partition is not possible.
So why not? It should be easy to create a partition and put data in it with tools like DMF, to enable us to create ad hoc demo / training partitions. Having played for a while with some SQL code, the following code was obtained.
First browse the partitions table to find the RecId of the partition one wants to delete.
The script below contains SQL code to delete PS, EXT and Cube partitions.
Be careful don’t delete the initial partition or a partition with production data. Also note that it will not ask for a confirmation when you run this script. I would strongly recommend you to create a backup of the database before running this.
This script is ‘as-is’. There are no guarantee on this code. I you use it, test it carefully. The results are your responsibility.