Skip to content

create user incorrectly extracted from Fabric SQL db #631

@dzsquared

Description

@dzsquared
  • SqlPackage or DacFx Version: SqlPackage 170.0, Microsoft.Build.Sql 1.0.0 and v2-preview.1
  • .NET Framework (Windows-only) or .NET Core:
  • Environment (local platform and source/target platforms): local SQL proj and SqlPackage, Fabric SQL web editor

(SqlPackage, reverse engineering) When a user that was added to Fabric SQL DB with the syntax CREATE USER [name] WITH SID = <value>, TYPE = E, SqlPackage extracts this user as CREATE USER [name] FROM EXTERNAL PROVIDER. The user should be extracted with the SID syntax and type E/X.

Steps to Reproduce:

  1. Create a SQL database in Fabric.
  2. Add a user with the script through the Fabric web editor:
CREATE USER [SID User]
    WITH SID = 0x82562AFAB2BCC94782EF0C9AFE7B8A20, TYPE = E;
  1. Obtain the db connection string
  2. Use Sqlpackage to extract the DB to SQL files sqlpackage /a:extract /tf:SQL /p:ExtractTarget=ObjectType /scs:"Data Source=rfehu34whfh34wio34fvuvbu3bnufi3thisistotallymadeup.database.fabric.microsoft.com,1433;Initial Catalog=adatabase-1faa90b6-7028-478c-8df2-1c479e38e5cf;Multiple Active Result Sets=False;Connect Timeout=30;Encrypt=True;Trust Server Certificate=False;Authentication=Active Directory Interactive"
  3. Viewing the SQL file in the Security folder shows the incorrect user definition with FROM EXTERNAL PROVIDER
  4. optionally - extract the database to a dacpac, then try to publish that dacpac to a new SQL DB in Fabric

Docs:

Metadata

Metadata

Assignees

Labels

bugSomething isn't workingfixed-pending-releaseFix in upcoming releasesqldbfabricIssues related to SQL database in Fabric

Type

No type

Projects

No projects

Relationships

None yet

Development

No branches or pull requests

Issue actions