Technical documentation - Azure SSMS migration
Ā
Migrating database from SQL to Azure. 2
Create a .bacpac file of the database (DB) using SQL Server Management SSMS. 2
Import the .bacpac file using SSMS. 2
Run the script to authorize the authentication to Azure. 3
Ā
Migrating database from SQL to Azure
Create a .bacpac file of the database (DB) using SQL Server Management SSMS
Open SSMS and login. Right click on the database you want to create a backup for and choose Tasks -> Export Data-tier Applicationā¦
Ā
Introduction: Click Next,
Export Settings: choose a location for where you want the .bacpac file to be saved.
Summary: Click Next,
Results: Click Done.
Import the .bacpac file using SSMS
Open SSMS and login. Right click on the Databases folder and choose Import Data-tier-Applicationā¦
Ā
Ā
Introduction: Click Next,
Export Settings: choose the .bacpac file that you created.
Summary: Click Next,
Results: Click Done.
Ā
Run the script to authorize the authentication to Azure
Ā
To run the script, you need to ensure that the application is system assigned in Azure
Ā
Ā
Ā
Ā
And make sure that you have access rights to run the script on the Virtual Machine (VM).
Ā
Ā
Ā
Ā
The script needs to be run on each database used by the application in either SSMS or Azure Data Studio (ADS).
Ā
Roles can vary for the script, to be sure the access is allowed use db_owner. (Might change later).
Ā
CREATE USER [Name_of_virtual_machine] FROM LOGIN [Azure_Server_User] ALTER ROLE db_owner ADD MEMBER [Name_of_virtual_machine]
Ā
Ā
The database is now imported to Azure and the correct authentication is used.
Ā
Ā