Try our conversational search powered by Generative AI!

Import of large exported database fails



I'm facing an issue when importing a database to my LocalDB instance. The .bacpac file is an export of my production database and is 1GB in size.

The error:

Error SQL72016: Could not allocate a new page for database 'xxxxxx' 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.
The statement has been terminated.

I think the problem is that the log file is limited to 2GB and has autogrowth disabled. When re-enabling indexes, the log file size needs to be able to grow beyond that limit but it fails.

I've tried to following:

  • Restore to LocalDB, SQL Server Express and to a new Azure DB; all failed
  • Edit the .bacpac file, but cannot find anything meaningful to edit that would help here
  • Edit the file properties during the import process, which cannot be saved during the import

Anyone had success with restoring a large database locally?

Jun 07, 2023 7:34

What seems to work is install SQL Server, not use Local DB or SQL Server Express. The Developer Edition is good enough for local use. The import succeeded.

Jun 07, 2023 8:43

Hi Frederik,

Your question is probably more suited to StackOverflow or an mssql forum.

However, based on the information you have provided see the issue here.


Jun 07, 2023 8:46
This topic was created over six months ago and has been resolved. If you have a similar question, please create a new topic and refer to this one.
* You are NOT allowed to include any hyperlinks in the post because your account hasn't associated to your company. User profile should be updated.