'Restore a bacpac file to sql azure with large database size (SqlPackage.exe)
I'm trying to restore a large (~10GB) database from a bacpac file using SqlPackage.exe. (command shown below). The issue is that I hit the 1GB limit for web databases during the import and it fails.
Since I can only restore the bacpac to a new database I cant resize the base database it before importing the data. On the gui there is an option to specify the size but I cant find a command line argument that corresponds (see below for screenshot). I have read the documentation. Is what I'm trying to do possible?
.\lib\sqlServer\DAC\bin\SqlPackage.exe /a:"Import" /tdn:"qa02_sgp" /tp:"somepassword" /tsn:"somehostname.database.windows.net" /tu:"sa@somehostname" /sf ".\data\perftestdb.bacpac"

Solution 1:[1]
For anyone finding this today, the current SqlPackage.exe supports this via flags:
/p:DatabaseEdition=({ Basic | Standard | Premium | DataWarehouse | GeneralPurpose | BusinessCritical | Hyperscale | Default } 'Default')
/p:DatabaseMaximumSize=(INT32) - Defines the maximum size in GB of an Azure SQL Database.
/p:DatabaseServiceObjective=(STRING) - Defines the performance level of an Azure SQL Database such as "P0" or "S1".
Amongst other options: see https://docs.microsoft.com/en-gb/sql/tools/sqlpackage/sqlpackage-import?view=sql-server-ver15
Solution 2:[2]
The CREATE DATABASE T-SQL allows you to specify database edition and max size
Sources
This article follows the attribution requirements of Stack Overflow and is licensed under CC BY-SA 3.0.
Source: Stack Overflow
| Solution | Source |
|---|---|
| Solution 1 | Andy |
| Solution 2 | Nathan |
