Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Publish DACPAC file failed due to bind rule with a user-defined data type #245

Closed
ssreerama opened this issue Mar 24, 2023 · 1 comment
Closed
Assignees
Labels
bug Something isn't working fixed-pending-release Fix in upcoming release triaged

Comments

@ssreerama
Copy link

ssreerama commented Mar 24, 2023

  • SqlPackage or DacFx Version: 6.1.8089.0
  • .NET Framework (Windows-only) or .NET Core: both
  • Environment (local platform and source/target platforms): Tested on SQL MI / SQL 2022
  • Issue: When cx try to publish a DACPAC file to an existing databse (Azure SQL MI) that has bind rule with a user defined data type they will get error :SQL72018: SqlRule could not be imported but one or more of these objects exist in your source.

Steps to Reproduce:

  1. Create a database [DBOAD01]
  2. Run the below script 1
  3. Deploy the attached sample dacpac using the NET Core version (ICM: 377020710 has the sample dacpac).

Did this occur in prior versions? If not - which version(s) did it work in?

(DacFx/SqlPackage/SSMS/Azure Data Studio)

@ssreerama ssreerama added the bug Something isn't working label Mar 24, 2023
@ssreerama
Copy link
Author

Script -1: to create user defined data types and adding bind rule.

USE [DBOAD01]
GO
CREATE TYPE [dbo].[u_id] FROM [bigint] NOT NULL
GO
CREATE TYPE [dbo].[u_upd_dt] FROM [datetime] NOT NULL
GO
CREATE TYPE [dbo].[u_web_lgn_cd] FROM [bigint] NOT NULL
GO
CREATE RULE [dbo].[r_acr_cyc_mo_qt] 
AS
@range>100;
GO
EXEC sys.sp_bindrule @rulename=N'[dbo].[r_acr_cyc_mo_qt]', @OBJName=N'[dbo].[u_id]'

@ssreerama ssreerama changed the title Publish DACPAC file failed due to bind rule with a user-defined data type in NET Core version Publish DACPAC file failed due to bind rule with a user-defined data type Mar 25, 2023
@ssreerama ssreerama added this to the Next Release milestone Mar 29, 2023
@ssreerama ssreerama self-assigned this Mar 29, 2023
@dzsquared dzsquared added the fixed-pending-release Fix in upcoming release label May 9, 2023
@llali llali closed this as completed May 11, 2023
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
bug Something isn't working fixed-pending-release Fix in upcoming release triaged
Projects
None yet
Development

No branches or pull requests

3 participants