Issue while importing bacpac file into sql server database

GOGATE, AKSHAY 0 Reputation points
2025-12-09T19:32:00.75+00:00

I’m trying to import a BACPAC file into a new SQL Server database. My BACPAC file is stored in an Azure Storage account. When I use the “Import Database” option on SQL Server, I select my storage account and provide the necessary credentials (username, password, etc.). The process creates a new database and shows that it’s “importing,” but when I check the database, there are no tables added. Additionally, when I review the import/export history, it remains stuck at 1%.

Azure SQL Database
{count} votes

2 answers

Sort by: Most helpful
  1. Q&A Assist
    2025-12-09T19:32:12.05+00:00
    AI generated content. This question contains an answer created with AI from Q&A Assist. Learn more

    It sounds like you are experiencing issues with the import process of your BACPAC file into SQL Server. Here are a few points to consider:

    1. File Size Limitations: If your BACPAC file is over 150 GB, there is a known issue where the import may fail or get stuck. It is recommended to use the SqlPackage command-line utility for larger files, as the Azure portal may not handle them well.
    2. Disk Space Requirements: Ensure that the machine processing the import has enough disk space. The required disk space can be up to three times the size of the database, and if there is insufficient space, the import may fail.
    3. Validation Issues: Check the validation page during the import process for any issues that might block the operation. If there are blocking issues, resolve them and re-run the validation.
    4. Log Files: Make sure you have specified a local directory for log files during the import process. This can help in troubleshooting any errors that occur during the import.
    5. Permissions: Ensure that the account you are using has the necessary permissions to perform the import operation.

    If the problem persists, consider using the SqlPackage command-line utility to import the BACPAC file, as it provides more control and may handle larger files better.


    References:

    0 comments No comments

  2. Pilladi Padma Sai Manisha 585 Reputation points Microsoft External Staff Moderator
    2025-12-09T19:58:45.6866667+00:00

    Hi GOGATE, AKSHAY,
    Thank you for reaching out to Microsoft QA!
    It sounds like you’re having some trouble importing a BACPAC file into your SQL Server database. This can sometimes be a bit tricky, especially if the process is getting stuck at 1% without creating tables.
    Here are a few things you can try to resolve this issue:
    Check Permissions: Make sure the account you're using has the necessary permissions. You need to be a member of the sysadmin or serveradmin roles, or have the dbcreator role along with ALTER ANY LOGIN permissions.​

    Validate the BACPAC file: Ensure your BACPAC file isn't corrupted. Try importing it into a different database or verify it with tools like Storage Explorer.​

    Disable Multi-Factor Authentication (MFA): If using Microsoft Entra ID with MFA enabled, it can interfere with imports via SSMS or portal. Use SQL authentication or sqlpackage which supports Entra auth better.​

    Import Tool: Skip SSMS wizard for remote blobs use sqlpackage.exe instead for detailed logs and reliability:

    text
    SqlPackage /a:Import /sf:"C:\path\to\yourfile.bacpac" /tdn:YourDBName /tsn:YourServer.database.windows.net /ua:True /tid:"yourtenant.onmicrosoft.com"
    

    Download it from Microsoft's releases and download the BACPAC locally first.​

    Monitor Import Status: Check Azure Portal > SQL Server > Import/Export history for errors or Request IDs.​

    Check Network and Configuration: Place storage and SQL Server in the same region to cut latency; cross-region adds significant delays.​

    Check for Concurrent Processes: Cancel overlaps with PowerShell:

    text
    Stop-AzSqlDatabaseActivity -ResourceGroupName "YourRG" -ServerName "YourServer" -DatabaseName "YourDB" -OperationId "YourOpId"
    

    Get OpId from portal history.​

    Storage and Size Limits: For files >150GB, sqlpackage is required as portal/SSMS may fail.​

    Hope these get your import working! Share sqlpackage logs or Request ID if still stuck.

    Relevant Documentation:

    Import a BACPAC file to a new Azure SQL Database

    SqlPackage command-line utility

    Troubleshooting Import/Export with SqlPackage

    Permissions required for importing BACPAC

    Let me know if you need more assistance!
    Following up to see if the below answer was helpful. If this answers your query, do click Accept Answer and Yes for was this answer helpful. And, if you have any further query do let us know.

    0 comments No comments

Your answer

Answers can be marked as 'Accepted' by the question author and 'Recommended' by moderators, which helps users know the answer solved the author's problem.