Saranya
Saranya

Reputation: 2008

Can I create a dacpac including data in SQL Server 2008?

Can I create a DACPAC including data in SQL Server 2008?

My requirement is to generate the incremental script of the DB changes, would I be able to do that using BACPAC?

I tried reading this, but this is not much helpful:

https://msdn.microsoft.com/en-us/library/jj860455(v=vs.103).aspx

Upvotes: 5

Views: 776

Answers (1)

user1773603
user1773603

Reputation:

You can use SqlPackage.exe tool manually found actions here.

Use Export action as:

sqlpackage.exe /action:Export /TargetFile:"test.bacpac" 
    /sourceDatabasename:test 
    /sourceservername:.\testserver

Use Extract action as:

sqlpackage.exe /action:Extract /TargetFile:"test.dacpac" 
    /sourceDatabasename:test 
    /sourceservername:".\testserver"
    /p::ExtractAllTableData=true

By default, data for all tables will be included in the .bacpac file.

Upvotes: 2

Related Questions