0

I'm running sqlpackage.exe as park of an automated deployment script creation process, however we have synonyms in the database, which are different depending on the environment (Dev/Test/Live). The problem is that the database project has the synonyms as they are in the Dev environment, but when I run sqlpackage to compare against Test or Live, the synonyms are different and so they get scripted to be dropped and re-added to point to Dev.

I've seen on http://blogs.msdn.com/b/ssdt/archive/2015/02/23/new-advanced-publish-options-to-specify-object-types-to-exclude-or-not-drop.aspx that apparently there's a new parameter "ExcludeObjectType", but when I try running it using that parameter it gives me an error 'ExcludeObjectType' is not a valid argument for the 'Script' action (and I have the latest version of sqlpackage.exe).

Any ideas on what I can do here?

Matt Eno
  • 687
  • 5
  • 25

2 Answers2

3

After downloading the latest SSDT for Visual Studio I still had the same issue. Next I downloaded Data-Tier Application Framework (May 2015) and used the new SqlPackage installed at C:\Program Files\Microsoft SQL Server\120\DAC\bin\sqlpackage.exe and the error went away and worked as expected.

Eugene Niemand
  • 721
  • 6
  • 28
-1

Thank you sir! When I created the deployment script in VS, no change detected but when I tried to deploy using sqlpackage I got the error: * The object [x] already exists in database with a different definition and will not be altered. After adding the ExcludeObjectTypes switch I got the following error: * 'ExcludeObjectTypes' is not a valid argument for the 'Publish' action. But after downloading and installing latest Data-Tier App framework all works as expected with no errors.

sqlsurfer
  • 1
  • 3