I am using Azure mobile services and I want to export my database to an MDF file so I can use it in (test) applications that expect an MDF.
How can I do it?
mdf file by opening the Properties window of the data connection: Select View > SQL Server Object Explorer to open the SQL Server Object Explorer window. Expand (localdb)\MSSQLLocalDB > Databases, and then right-click on SampleDatabase. mdf and select Properties.
Launch SSMS -> Connect to the SQL Server instance -> Right-click on Database -> Click Attach. In the new Locate Database Files window, browse the file system to locate the MDF file. Double-click it. The associated data files and log files are populated in the associated files grid view in the Attach Databases window.
Another way you can do this with UI
Export your Database as a .bacpac file.
Download that bacpac from the Storage Account you exported it to.
Import the bacpac into your local machine through SSMS.
Access to the MDF File by Right-Click on the Database and under Database Properties, you will see the location of the MDF File
let me know if that helps, Vin
It seems it is not supported out of box. However you can open the Azure SQL database in SQL Server Management Studio and generate Create Script that you can use to create the database in On-Prem server and if you need to copy the data as well then you can use bcp utility.
http://blogs.msdn.com/b/cesardelatorre/archive/2010/06/04/importing-exporting-data-to-sql-azure-databases-using-bcp-and-sql-scripts.aspx
Steps to create MDF file.
If you love us? You can donate to us via Paypal or buy me a coffee so we can maintain and grow! Thank you!
Donate Us With