Skip to content

Export and Import using BACPAC Package

Export and Import Data-Tire Wizard for BACPAC Package

· BACPAC Package is used to Export, Refresh and Import the tables of the Database.

· If the user wants to Export some specific Tables in the Database and then Import them after the refresh, this can be done using BACPAC Package.

· Sometimes it becomes difficult to use simple Export and Import wizards between production and test environment. So, an alternative BACPAC Package.

· BACPAC is the acronym for Backup Package, which consists of schema and data for SQL Server tables.

· User can export database tables in a BACPAC package and give it to developers for refreshing data per their convenience.

· Connect to a SQL instance and expand databases in the object explorer. Right-click on a database in SSMS and you get data-tier application options as shown below.

img

1. Export Data-Tire Application Wizard for BACPAC

· In this example we create a copy of a Database in the same instance.

· Right-click on the Database à Tasks à Export Data-tire Application.

· A new window opens with an introduction to the Export process.

· There are 3 steps involved.

  1. Export Setting

  2. Summary

  3. Results

img

Export Setting

· This will create BACPAC of the contents of the Database.

· Click on Browse and select a path in which the Export file will be saved.

img

· Give a proper name and save it.

img

· User can also select the tables that have to be exported under the Advanced heading.

img

Summary

· Click Next to view the summary of the Export.

· Summary will be viewed as Source and Target.

img

· Click finish and the Exporting of data starts with progress.

· User can check the progress in the same window.

Results

img

· Success massage starts appearing after each table.

img

· The Export file will be exported to the destination in a BACPAC format.

2. Import Data-Tire Application Wizard BACPAC Package

· User can Import the Exported file to the same instance in the SQL Management Studio.

· Right-click on the instance in which the file has to be imported and select Import Data-Tire Application.

img

· A new window opens with an introductory message about Import Data-Tire Application.

· 3 steps involved in importing the BACPAC file are

  1. Specify the BACPAC import file.

  2. Import configuration

  3. Import and verify data

img

· Click on Browse and select the file that has to be imported.

img

· Select the BACPAC file to import.

img

· Click Next and go to Database Setting where a New Name can be given to the Database.

img

· Next page is the Summary page that will display both the Source and Target of the file to be imported.

img

· The Results page will display the status or the progress of the Importing data.

img

· Imported Database will be displayed under the Databases list.

img