Dynamics 365 is not a database.
Microsoft Dynamics 365 is a suite of intelligent business applications that help organizations manage and streamline their processes, enhance customer engagement, and make data-driven decisions. It combines ERP (Enterprise Resource Planning) and CRM (Customer Relationship Management) capabilities into one cloud-based platform, offering a range of modular applications that can be tailored to meet the specific needs of businesses across various industries.
Of course the individual applications (like Business Central) are running on a database. In most common cases this is MS MS SQL.
So it makes no sense to say: "I want to migrate from Dynamics 365 to MS SQL" These are different layers where no migration process is possible.