Exporting a deployed data-tier application (DAC) or database creates an export file that includes the definitions of the objects in the database and all of the data in the tables. The export file can then be imported to another instance of the Database Engine, or to Azure SQL Database. The export-import operations can be combined to migrate a DAC between instances, to create an archive, or to create an on-premises copy of a database deployed in SQL Database.
The export process builds a DAC export file in two stages.
The export process sets the DAC version to 1.0.0.0 and the DAC description in the export file to an empty string. If the database was deployed from a DAC, the DAC definition in the export file contains the name given to the original DAC. Otherwise, the DAC name is set to the database name.
To export a DAC, you need to possess at least ALTER ANY sign-in and database-level VIEW DEFINITION permissions and SELECT permissions on sys.sql_expression_dependencies`. This task is achievable for individuals holding membership in the securityadmin fixed server role and the database_owner fixed database role within the source database of the DAC. Furthermore, exporting a DAC is feasible for those who are part of the sysadmin fixed server role or those with access to the built-in SQL Server system administrator account named sa.
On Azure SQL Database, you must grant for each database VIEW DEFINITION and SELECT permission on all tables or specific tables.
To Export a DAC Using a Wizard
This page describes the steps for the Export Data-tier Application Wizard.
Options
Do not show this page again. - Select the check box to stop the Introduction page from being displayed in the future.
Next - Proceeds to the Select DAC Package page.
Cancel - Cancels the operation and closes the Wizard.
Use this page to specify the location where you want the BACPAC file to be created.
To specify a subset of tables to export, use the Advanced option.
Use this page to review the operation's specified source and target settings. To complete the export operation using the specified settings, select Finish. To cancel the export operation and exit the Wizard, select Cancel.
This page displays a progress bar that indicates the status of the operation. To view detailed status, select the View details option.
This page reports the export operation's success or failure, showing each action's results. Any action that encountered an error has a link in the Result column. Select the link to view a report of the error for that action.
of the data-tier application results page." />
Select Finish to close the Wizard.
To export a DAC using the Export() method in a .Net Framework application.
A DAC or database can only be exported from a database in SQL Database, or SQL Server 2005 (9.x) Service Pack 4 (SP4) or later.
You can't export a database with objects that aren't supported in a DAC or contain users. For more information about the types of objects supported in a DAC, see DAC Support For SQL Server Objects and Versions.
If you receive a failing with Out of Disk space message, it's advisable to configure the % TEMP % folder of the system to reside on a distinct data disk. By doing so, you can ensure sufficient space for the export process to execute smoothly, avoiding potential disk space complications.
To configure the system's %TEMP% folder: