I am trying to copy a 2022 database to a 2017 server using SqlPackage command line.
I'm extracting using this:
SqlPackage /a:Extract /tf:"Foo.dacpac" ...credentials... /p:VerifyExtraction=False /p:ExtractAllTableData=True
and trying to publish using this:
SqlPackage /a:Publish /sf:"Foo.dacpac" ...credentials... /p:VerifyDeployment=False
But I get this error:
A project which specifies SQL Server 2022 or Azure SQL Database Managed Instance as the target platform cannot be published to SQL Server 2017.
Is there any way to specify the target platform as 2017? I don't see any options for that in the SqlPackage documentation. But I assume there must be a way, since BACPAC/DACPAC was recommended as the approach for different versions in this answer: https://dba.stackexchange.com/a/289341/275732