Skip to main content

Notifications

Announcements

No record found.

Microsoft Dynamics CRM (Archived)

How to delete Microsoft Dynamics CRM 365 Organization in SQL

Posted on by 1,255

Hi,

I would like to delete the newly created organization from CRM including the CRM Organization in SQL.

What should be the proper steps in deleting Microsoft Dynamics CRM 365 Organization in SQL?

Thanks in advance.

*This post is locked for comments

  • Verified answer
    Kokulan Profile Picture
    Kokulan 18,048 on at
    RE: How to delete Microsoft Dynamics CRM 365 Organization in SQL

    Hi

    The recommended approach to delete a CRM Org is to disable and delete it from the Deployment Manager.

    Please see the link below

    docs.microsoft.com/.../delete-an-organization

    As explained in the page, the SQL DB will not be deleted automatically, for recovering from accidental deletion of Organization. But you can open the SSMS and delete the database manually.

    If you want to automatically do both, you could consider doing the whole thing in a PowerShell script

    First you can disable and delete the org in a supported way  and then 

    "You can implement the procedure described here by using a Windows PowerShell cmdlet. For more information, see the Disable-CrmOrganization and Remove-CrmOrganization commands."

    And you can include steps in your powershell script to delete database as well

    https://stackoverflow.com/questions/24149363/drop-sql-server-database-from-powershell

    I would recommend, you do a backup of the DB before you delete it automatically

  • Suggested answer
    Aric Levin Profile Picture
    Aric Levin 30,188 on at
    RE: How to delete Microsoft Dynamics CRM 365 Organization in SQL

    First go to deployment manager on the CRM Server. Deactivate the organization that you created. After you deactivate the organization, you should be able to delete it from deployment manager (you can only delete deactivated organizations).

    After the organization is deleted from deployment manager, go to your SQL Server where you have the database that you want to delete, and delete it from there.

    Hope this helps.

  • bac26 Profile Picture
    bac26 2,268 on at
    RE: How to delete Microsoft Dynamics CRM 365 Organization in SQL

    DO you just want delete it out of SQL or do a full uninstall?    

Under review

Thank you for your reply! To ensure a great experience for everyone, your content is awaiting approval by our Community Managers. Please check back later.

Helpful resources

Quick Links

December Spotlight Star - Muhammad Affan

Congratulations to a top community star!

Top 10 leaders for November!

Congratulations to our November super stars!

Tips for Writing Effective Suggested Answers

Best practices for providing successful forum answers ✍️

Leaderboard

#1
André Arnaud de Calavon Profile Picture

André Arnaud de Cal... 291,280 Super User 2024 Season 2

#2
Martin Dráb Profile Picture

Martin Dráb 230,235 Most Valuable Professional

#3
nmaenpaa Profile Picture

nmaenpaa 101,156

Leaderboard

Featured topics

Product updates

Dynamics 365 release plans