0

Am using Sqlpackage.exe for to deploy my latest .dacpac into the SynapseSql using this command:

sqlpackage /Action:Publish /SourceFile:test.dacpac /p:DropObjectsNotInSource=TRUE /p:ExcludeObjectTypes="Permissions;Users;RoleMembership;Logins;ServerRoles;ServerRoleMembership;ExternalDataSources" /TargetConnectionString:"***********"

The deployment worksout, but all external tables are always dropped and recreated: enter image description here

The dropped and recreated external table looks exactly same.

This issue if dropping / recreating has been fixed with release 162.0.52 of SqlPackage: enter image description here Source: https://learn.microsoft.com/en-us/sql/tools/sqlpackage/release-notes-sqlpackage?view=sql-server-ver16#162052-sqlpackage

Any idea, who the dropping and recreation of external table still occurs (am using version 162.0.52)?

R. Maier
  • 340
  • 2
  • 13
  • Does it happening to single table only? Check if you have "re-create" database setting on. Review your publish profile settings, there could be some setting forcing it to do so. Create completely fresh project to the new database, put that single table and check if it is reproduceable on default settings – Dmitrij Kultasev Jul 28 '23 at 06:27
  • No, it's affecting all external tables. – R. Maier Jul 31 '23 at 08:33
  • The publish profile has no explicit information to make a completely fresh project – R. Maier Jul 31 '23 at 08:34
  • I never worked with external tables, but I saw similar behavior with synonyms that can happen when sql server settings differs with ones from production. Another thing I can suggest to add "do not drop tables" setting and check what will happen – Dmitrij Kultasev Aug 01 '23 at 16:41

0 Answers0