%3CLINGO-SUB%20id%3D%22lingo-sub-369147%22%20slang%3D%22en-US%22%3ELesson%20Learned%20%2351%3A%20Managed%20Instance%20-%20Import%20via%20Sqlpackage.exe%20doesn't%20allow%20autogrow%3C%2FLINGO-SUB%3E%3CLINGO-BODY%20id%3D%22lingo-body-369147%22%20slang%3D%22en-US%22%3E%0A%20%26lt%3Bmeta%20http-equiv%3D%22Content-Type%22%20content%3D%22text%2Fhtml%3B%20charset%3DUTF-8%22%20%2F%26gt%3B%3CSTRONG%3EFirst%20published%20on%20MSDN%20on%20Dec%2029%2C%202018%20%3C%2FSTRONG%3E%20%3CBR%20%2F%3E%20Some%20days%20ago%2C%20I%20have%20been%20working%20in%20a%20service%20request%20that%20our%20customer%20faced%20the%20following%20issue%3A%20%3CBR%20%2F%3E%3CUL%3E%3CBR%20%2F%3E%3CLI%3EThey've%20downloaded%20the%20newest%20version%20of%20Sqlpackage.exe%20tool%20(18.0)%20and%20they're%20trying%20to%20import%20a%20bacpac%20into%20their%20Azure%20SQL%20Managed%20Instance.%20It%20has%20started%20successfully%20but%20it's%20hanging%20while%20it%20reaches%2032%2C768%20MB%20size%20of%20primary%20filegroup%20of%20imported%20DB%20and%20the%20import%20process%20raised%26nbsp%3Bthe%20following%20error%3A%3C%2FLI%3E%3CBR%20%2F%3E%3C%2FUL%3E%3CBR%20%2F%3E%3CP%3E'%20Could%20not%20allocate%20a%20new%20page%20for%20database%20'customer_database'%20because%20of%20insufficient%20disk%20space%20in%20filegroup%20'PRIMARY'.%20Create%20the%20necessary%20space%20by%20dropping%20objects%20in%20the%20filegroup%2C%20adding%20additional%20files%20to%20the%20filegroup%2C%20or%20setting%20autogrowth%20on%20for%20existing%20files%20in%20the%20filegroup'.%3C%2FP%3E%3CBR%20%2F%3E%20Let%20me%20explain%20that%20when%20you%20create%20a%20database%20in%20Azure%20SQL%20Managed%20Instance%20the%20autogrowth%20is%20enabled%20but%20limited%20in%20space%2C%20so%2C%20you%20need%20to%20change%20it%20as%20follows%3A%20%3CBR%20%2F%3E%3CUL%3E%3CBR%20%2F%3E%3CLI%3EUsing%26nbsp%3BSQL%20Server%20Management%20Studio%20and%20properties%20of%20the%20database%20-%26gt%3BFiles%2C%20I%20was%20able%20to%20change%20the%20value%20of%20this%20max%20growth%3C%2FLI%3E%3CBR%20%2F%3E%3C%2FUL%3E%3CBR%20%2F%3E%3CP%3E%3CIMG%20src%3D%22https%3A%2F%2Ftechcommunity.microsoft.com%2Ft5%2Fimage%2Fserverpage%2Fimage-id%2F89094iBBE4F274F1AD53EA%22%20%2F%3E%3C%2FP%3E%0A%20%0A%3C%2FLINGO-BODY%3E%3CLINGO-TEASER%20id%3D%22lingo-teaser-369147%22%20slang%3D%22en-US%22%3EFirst%20published%20on%20MSDN%20on%20Dec%2029%2C%202018%20Some%20days%20ago%2C%20I%20have%20been%20working%20in%20a%20service%20request%20that%20our%20customer%20faced%20the%20following%20issue%3A%20They've%20downloaded%20the%20newest%20version%20of%20Sqlpackage.%3C%2FLINGO-TEASER%3E%3CLINGO-LABS%20id%3D%22lingo-labs-369147%22%20slang%3D%22en-US%22%3E%3CLINGO-LABEL%3Eautogrowth%3C%2FLINGO-LABEL%3E%3CLINGO-LABEL%3Eazure%20sql%20managed%20instance%3C%2FLINGO-LABEL%3E%3CLINGO-LABEL%3Ecould%20not%20allocate%20a%20new%20page%3C%2FLINGO-LABEL%3E%3CLINGO-LABEL%3Esqlpackage%3C%2FLINGO-LABEL%3E%3C%2FLINGO-LABS%3E
First published on MSDN on Dec 29, 2018
Some days ago, I have been working in a service request that our customer faced the following issue:

  • They've downloaded the newest version of Sqlpackage.exe tool (18.0) and they're trying to import a bacpac into their Azure SQL Managed Instance. It has started successfully but it's hanging while it reaches 32,768 MB size of primary filegroup of imported DB and the import process raised the following error:


' Could not allocate a new page for database 'customer_database' because of insufficient disk space in filegroup 'PRIMARY'. Create the necessary space by dropping objects in the filegroup, adding additional files to the filegroup, or setting autogrowth on for existing files in the filegroup'.


Let me explain that when you create a database in Azure SQL Managed Instance the autogrowth is enabled but limited in space, so, you need to change it as follows:

  • Using SQL Server Management Studio and properties of the database ->Files, I was able to change the value of this max growth