Hi @Shubhi Jain , thanks for your response.
<Writing it as another answer as word limit was crossing 1600 characters>
After we have generated the bacpac we can run below command to upload bacpac to storage account. You can generate your own SAS and use it here:
azcopy copy "<location of bacpac>" "https://xxxxx.blob.core.windows.net/testcontainer/?sv=2020-08-04&ss=bfqt&srt=sco&sp=gghghhgtfx&se=2021-09-18T15:00:04Z&st=2021-09-14T07:00:04Z&spr=https&sig=sdhjdshjdhjhjhwgb0bD6hY2T%2Bs%2FJxtfkJIRA%3D"
Get started with AzCopy
After this we can run below command to import this bacpac to azure SQL Database:
$importRequest = New-AzSqlDatabaseImport -ResourceGroupName $resourceGroupName `
-ServerName $serverName `
-DatabaseName $databaseName `
-DatabaseMaxSizeBytes 100GB `
-StorageKeyType "StorageAccessKey" `
-StorageKey $(Get-AzStorageAccountKey -ResourceGroupName $resourceGroupName -StorageAccountName $storageAccountName).Value[0] `
-StorageUri "https://$storageaccountname.blob.core.windows.net/$storageContainerName/$bacpacFilename" `
-Edition "Standard" `
-ServiceObjectiveName "S3" `
-AdministratorLogin "$adminSqlLogin" `
-AdministratorLoginPassword $(ConvertTo-SecureString -String $password -AsPlainText -Force)
PowerShell
Please note this entire process cannot be achieved using sqlpackage, so we need to use alternative approach on the same.
We can discuss further in case more information is needed.
----------
Please don't forgot to click on accept it as answer button wherever the information provided helps you. This can be beneficial to other community members as well..