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.
Â
Â