SSDT, do I need different dacpacs if I need to deploy the same db on SQL Server 2008 and 2012?

When converting a database project to SSDT and upgrading to SQL Server 2012, I need to deploy a script to work for both SQL Server 2008 and 2012.

I use sqlpackage.exe /Action:Publishto deploy the last bits of database data.

In the properties of the sqlproj project, I see a drop-down list of the target platform with the server 2005/2008/2012 sql server parameters. Does it create another dacpac if I change this target platform? Do I need to migrate two versions of dacpac for each version of sql server?

Or will the same dacpac work for any version of sql server?

+5
source share
3

: - DACPAC SQL Server. Bob Beuachemin DAC Fx3.0 DAC 2.0

+4

, 11 , , - AllowIncompatiblePlatform.

//Set Deployment Options
DacDeployOptions dacOptions = new DacDeployOptions();
dacOptions.AllowIncompatiblePlatform = true;

dac 2008 sql2012, , dac 2012 sql2008 :

Microsoft.Data.Tools.Schema.Sql.Deployment.DeploymentCompatibilityException: 
A project which specifies SQL Server 2012 as the target platform cannot be published to SQL Server 2008.

, ( 2005 ). NB PaymentVerificationErrorsAsWarnings true - YMMV.

+6

SqlPackage.exe p:AllowIncompatiblePlatform. , . dacpac SQL Server 2012, SQL Sever 2008 R2.

SqlPackage.exe /Action:Publish 
   /SourceFile:"testdb.dacpac" 
   /TargetDatabaseName:testDb 
   /p:AllowIncompatiblePlatform=true
   /TargetServerName:"testserver"
+2
source

All Articles