DacFx icon indicating copy to clipboard operation
DacFx copied to clipboard

Getting log message "object [data_0] and [log] exists in the target, but it will not be dropped" in SQL release pipeline

Open abhi421 opened this issue 2 years ago • 3 comments

  • SqlPackage or DacFx Version:
  • .NET Framework (Windows-only) or .NET Core:
  • Environment (local platform and source/target platforms):

Steps to Reproduce: I m getting this two log message in my azure SQL release pipeline which internally using sqlpackage.exe to publish the dacpac.

***The object [data_0] exists in the target, but it will not be dropped even though you selected the 'Generate drop statements for objects that are in the target database but that are not in the source' check box.

*** The object [log] exists in the target, but it will not be dropped even though you selected the 'Generate drop statements for objects that are in the target database but that are not in the source' check box.

I don't no the reason why I m getting this log message, I m using azure SQL database.

image

(DacFx/SqlPackage/SSMS/Azure Data Studio)

abhi421 avatar Sep 20 '22 08:09 abhi421

What version of SQL Server was the dacpac created from? Is it also Azure SQL db or is it on-prem?

kisantia avatar Sep 21 '22 15:09 kisantia

What version of SQL Server was the dacpac created from? Is it also Azure SQL db or is it on-prem?

@kisantia its a azure SQL db

abhi421 avatar Sep 22 '22 12:09 abhi421

Please share the .dacpac (privately) - the error indicates a non Azure SQL target

ErikEJ avatar Sep 22 '22 12:09 ErikEJ

Hi,

I'm getting the same error.

ivanscattergood avatar Mar 22 '23 16:03 ivanscattergood

Same issue for me when trying to deploy my dacpac file to the Azure SQL Database. Not sure about what specific objects this refers to.

Let me know if you need any specific details for investigating!

fifuente avatar Apr 07 '23 17:04 fifuente

@zijchen @llali fyi a few people have been running into this. Could one of you please help?

kisantia avatar Apr 07 '23 18:04 kisantia

there are certain objects (e.g FileGroup) which cannot get deleted in the target database. If you have a project trying to publish to a database with file group but the file group doesn't exist in the project you will get that error. These are just warnings and can be ignored in the build

llali avatar Apr 07 '23 18:04 llali

Can you share the diagnostics log file from sqlpackage? If you could share a dacpac/simple repro that would be even better.

zijchen avatar Apr 07 '23 19:04 zijchen

To further investigate this issue, we need at a minimum the diagnostic log (/df parameter) from a deployment.

dzsquared avatar Oct 24 '23 23:10 dzsquared