Skip to content

Extract option - replace DBName in 3-part naming with $(DatabaseName) variable #611

Open
@mbourgon

Description

@mbourgon
  • SqlPackage or DacFx Version: 162.5.57.1
  • .NET Framework (Windows-only) or .NET Core:
  • Environment (local platform and source/target platforms):
    .NET SDK:
    Version: 9.0.203
    Commit: dc7acfa194
    Workload version: 9.0.200-manifests.9df47798
    MSBuild version: 17.13.20+a4ef1e90f

Runtime Environment:
OS Name: Windows
OS Version: 10.0.17763
OS Platform: Windows
RID: win-x64
Base Path: C:\Program Files\dotnet\sdk\9.0.203\

Steps to Reproduce:

  1. create a trigger in an Azure SQL database, using a three-part name on the table that self-references the name of the database. So it would be (within the AdventureWorks database) "create trigger dbo.my_trigger_here on "AdventureWorks"."dbo"."mytablehere"..." (we can also duplicate it with "create trigger dbo.my_trigger_here on [Adventureworks].[dbo].[mytablehere]..." The trigger is valid and works. It's not using an external reference so it's legitimate.
  2. use SQLPACKAGE to EXTRACT it with VerifyExtraction=true (it didn't extract because of errors, I had to use VerifyExtraction=false, but this may simplify repro)
  3. sqlpackage /Action:Extract /SourceServerName:myazsqldb.database.windows.net /SourceDatabaseName:mydbname /SourceUser:myusername /SourcePassword:"mypassword" /TargetFile:myservername-mydbname /p:ExtractTarget=ObjectType /p:ignoreuserloginmappings=false /DiagnosticsFile:20250416_1319.log /p:ExtractAllTableData=false /p:VerifyExtraction=false

Did this occur in prior versions? If not - which version(s) did it work in?
No idea - I'm just now trying to set up CI/CD.

(DacFx/SqlPackage/SSMS/Azure Data Studio)
Unsure which, I think DacFx because I'm having the same problem trying to BUILD it in ADS, BUILD it in VS Code (SDK-style database projects), Visual Studio Preview (BUILD from an "SDK-style database project (preview)" with the code) and EXTRACTing with SQLPackage.

Metadata

Metadata

Assignees

No one assigned

    Labels

    enhancementNew feature or request

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions