As part of the Disaster Management, I was performing a Dynamics CRM recovery exercise for my On-Premise. Meaning, creating a new CRM Organization from the DB backup which we run daily overnight. After the DB restore was completed and the CRM Recovery Organization was up and running; It was time to delete the Organization to save the disk space and system resources from being utilized unnecessarily.
Note: Before you delete an organization, you need to Disable it first.
Open Dynamics 365 Deployment Manager. Under Organizations section, select the CRM Organization that you wish to delete:
Under Actions pane, click on Disable. You will be notified for confirmation on the selected action, select Yes.
Now under the same Action pane, click on Delete. You will be notified for the confirmation on the selected action, select Yes.
Notice the Organization is deleted from the list of CRM Organization
Now when you try to browse the CRM Organization link (one which just got deleted), notice a 404 – Page not found error.
You would wonder that the deletion process is completed, but No! The database that was created initially for the Organization still exists in DB.
To confirm the connections for the recovery Organization has been removed from CRM, you can run a simple query below under MSCRM_Config.
select * from Organization
As a result you would only see the existing Organizations.
Simply right click on the redundant Organization database, and select Delete.
Make sure you select the option to close all the existing connections before you click ok
Notice the DB is deleted as well. Process completed now! Hope this was helpful to someone.