This process uses SQL Server Management Studio (SSMS) to prepare a .bacpac file for uploading into an Azure container, which can then be imported into an Azure SQL Server instance.
Open SSMS and log on to the local v12 SQL Server
If the local SQL Server is not v12, then use SqlPackage:
SqlPackage
Export
Get latest sqlpackage installer: https://docs.microsoft.com/en-us/sql/tools/sqlpackage/sqlpackage-download?view=sql-server-ver15
"c:\Program Files (x86)\Microsoft SQL Server\140\DAC\bin\sqlpackage.exe" /a:Export /ssn:"." /sdn:"localdbname" /tf:i6_practiceinitials_officeinitials.bacpac /p:TargetEngineVersion=V12
Import
This method is also better than Azure Import DB Wizard as it gives complete error logs, but it takes longer, it could be faster if executed from an Azure VM in the same resource group and location:
"c:\Program Files (x86)\Microsoft SQL Server\140\DAC\bin\sqlpackage.exe" /a:Import /SourceFile:i6_practiceinitials_officeinitials.bacpac /TargetDatabaseName:i6_practiceinitials_officeinitials /TargetServerName:azuresqlserver.database.windows.net /TargetUser:azureaqlServerSaPassword /TargetPassword:azureaqlServerSaUsername /TargetTrustServerCertificate:True /p:DatabaseServiceObjective="S0"
The higher you put the p:DatabaseServiceObjective, (S0,S1,S2,S3) the faster the import procedure, then if the client wants a cheaper per month cost, downgrade the database tier.
V12 SQL Server on SSMS
In 'Object Explorer', right-click the database you wish to export and select Tasks > Export Data-tier Application.
Click 'Browse', select a suitable folder to save the .bacpac file and provide a suitable name (the name you provide is not important).
Click 'Next' then 'Finish' to start the export.
This process may take some time to complete.
Completion of the export process is confirmed by a green icon. Any steps which fail have a red icon. Clicking on the 'Result' hyperlink will show additional details.
In this case, the export succeeded.
.
Importing the .bacpac into Azure
To import the .bacpac, go to the Azure portal and log in.
Open (or create) a suitable storage account.
Open (or create) a suitable container for the .bacpac file.
Click 'Upload'.
In the 'Upload blob' panel on the right of the screen, click the file icon, navigate to where the .bacpac file was saved and select it.
.
Click 'Upload'.
NOTE: A Blob does not refer to a 1958 movie starring Steven (a.k.a. Steve) McQueen but instead to a "binary large object".
Comments
0 comments
Please sign in to leave a comment.