0

I would like to attach a .mdf file to my Microsoft Azure SQL database via SQL Server Management Studio, but when I try to right click to the "database" I can see the following:

enter image description here

As you can see there is no attach option, however when I do not login to this cloud server I can see the attach option there, and i could succesfully attach it, but it should be on the cloud.

enter image description here

I think I need to set some kind of permission somewhere, but I don't know what or where.

tried to find this permission options somewhere

jarlh
  • 42,561
  • 8
  • 45
  • 63
NoCukor
  • 11

1 Answers1

1

You cannot attach a native SQL Server database to Azure SQL (vCore or DTU model). You need to attach the .mdf file to a local SQL Server instance and then from there deploy the database to Azure SQL Database as shown below and explained here.

enter image description here

Alternatively, and I recommend you this option, you can use Azure Data Migration Assistant (DMA) to make sure the database is compatible with Azure SQL Database and then proceed to migrate the database easily using the same tool. Here you will find the steps to migrate the database using DMA. Here you will find how to perform an assessment of the database using DMA if you can attach it to an on-premises SQL instance (in your computer). You can download and install DMA from here.

Alberto Morillo
  • 13,893
  • 2
  • 24
  • 30