A bacpac file which is stored in Azure Blob storage or in local storage. In simple steps we can do import bacpac file in SQL server management studio.

Trying to import a BACPAC file in SQL Server Management Studio (SSMS)? Although the process is straightforward, issues such as outdated tools or configuration errors can interrupt the import. This guide explains how to import a BACPAC file into SQL Server and covers a common error you may encounter.

How to import bacpac file in SQL server management studio?

A BACPAC file is a ZIP archive with a .bacpac extension that contains both the schema and data of a SQL Server database. It is commonly used to move databases between SQL Server instances or import databases from Azure SQL.

Before You Begin

Before importing the BACPAC file, make sure that:

  • You are using the latest version of SQL Server Management Studio (SSMS).
  • The BACPAC file is available on your local system.
  • SQL Server is running and accessible.
  • Your account has permission to create a new database.
  • The server has enough disk space for the import.

1. First, we create a new database to import the Azure database.

2. Next, we open SSMS and connect to the local instance of MSSQL.

3. Right-click on the Databases and click Import Data-tier Application.

How to import bacpac file in SQL server management studio

4. Click Next on the welcome screen of the import wizard.

5. Then we select the path to the downloaded bacpac file. We select the option Import from local disk and click Browse. Then we navigate to the location to locate the.bacpac file. Then click Next.

6. Now, we enter the name of the database and define a location for the data and log files. Then click Next.

7. Then we review the Summary and ensure all the details are correct.

8. The time taken for the import process depends on the size of the file. Once the process finished, we click Close.

Note: The import time depends on the BACPAC file size, database complexity, and available server resources.

Common Import Errors

Could not load schema from packge (Microsoft.SqlServer.Dac)
Additional Information: Internal Error. The database platform service with type Microsoft.Data.Tools.Schema.SqlAzureDatabaseSchemaProvider is not valid. You must make sure the service is loaded, or you must provide the full type name of a valid database platform service (Microsoft.Data.Tools.Schema.Sql)

The error shows when SSMS was not at the current version. We make sure that SSMS  in the latest version. Our Support Engineers fixed the problem by updating the current version to the latest version.

Quick Troubleshooting

Issue Possible Cause Solution
Schema provider error Outdated SSMS Update SSMS to the latest version
Access denied Insufficient permissions Use an account with database creation privileges
Database already exists Existing database with the same name Specify a different database name
Import takes longer than expected Large BACPAC file Allow the import to complete and verify available server resources

[Need any assistance importing SQL backups? We’ll help you]

Conclusion

Importing a BACPAC file into SQL Server Management Studio is a straightforward process when the required prerequisites are in place. Keeping SSMS updated and checking the common issues above can help you complete the import successfully and avoid unnecessary errors.