November Happy Hour will be moved to Thursday December 5th.

Import of large exported database fails

Vote:
 

Hi,

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?

#303094
Jun 07, 2023 7:34
Vote:
 

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.

#303095
Jun 07, 2023 8:43
Vote:
 

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.

Paul

#303096
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.