1
votes

In SSMS 2014 I created a DACPAC file using Tasks > Extract Data-Tier Application.

I then Deployed the file to an Azure SQL Database. The scheme it deployed but all the tables are empty with no data.

How can I export the data? I though that SQL Server 2014 DACPAC file already included the data ...

2

2 Answers

1
votes

To move a database to Azure SQL you need to extract a BACPAC file which contains the data as well as schema. The DACPAC file does not contain the data.

Go to
Tasks > Export Data-Tier Application and you will get the file required.

Look here for more details : https://docs.microsoft.com/en-us/sql/relational-databases/data-tier-applications/export-a-data-tier-application

0
votes

You can include data from specific tables or from all tables in a DACPAC by using the SqlPackage tool.

SqlPackage.exe /a:Extract /p:ExtractAllTableData=true /SourceServerName:localhost /SourceDatabaseName:somedb /TargetFile:db.dacpac
SqlPackage.exe /a:Extract /p:TableData=dbo.SomeTable /p:TableData=dbo.SomeOtherTable /SourceServerName:localhost /SourceDatabaseName:somedb /TargetFile:db.dacpac