Schema differences for scalar-valued function
Personne n'a encore pris cette issue.
Évaluation
- Difficulté
- 4/5
- Temps estimé
- 3-5 jours
- Accessibilité débutants
- 38/100
Piste de recherche
Reproduisez le problème avec la définition de fonction SSMS fournie, la commande SqlPackage Extract et la comparaison Microsoft.SqlServer.DacFx en utilisant la version 162.2.111. Examinez comment la fonction scalaire est analysée et représentée après l’extraction, puis vérifiez que DeployReport ne signale plus d’opérations drop/create pour la fonction UETrim identique et que l’extraction se termine sans l’erreur de validation TRIM.
Rédigé par le modèle d'indexation à partir du texte de l'issue.
Description
- SqlPackage or DacFx Version: 162.2.111
- .NET Framework (Windows-only) or .NET Core: net8.0
- Environment (local platform and source/target platforms): Win11&Server 2019
Steps to Reproduce:
-- SSMS>
USE MASTER;
GO
CREATE DATABASE dacFxRepro;
GO
USE dacFxRepro;
GO
SET ANSI_NULLS ON
GO
SET QUOTED_IDENTIFIER ON
GO
CREATE FUNCTION [dbo].[UETrim] (@text NVARCHAR(MAX)) RETURNS NVARCHAR(MAX) WITH SCHEMABINDING AS
BEGIN
RETURN (TRIM(NCHAR(0x09) + NCHAR(0x20) + NCHAR(0x0D) + NCHAR(0x0A) FROM @text))
END
GO
-- PS>
-- dotnet tool install --global microsoft.sqlpackage --ignore-failed-sources
-- $server = '.'
-- $database = 'dacFxRepro'
-- $connectionString = "server=$server;database=$database;Integrated Security=true;Connection Timeout=300;Trusted_Connection=True;Encrypt=False;Command Timeout=300"
-- $dacpacPath = '.\dacFxRepro.dacpac'
-- sqlpackage @('/Action:Extract', "/TargetFile:$dacpacPath", "/SourceConnectionString:$connectionString", "/p:IgnoreUserLoginMappings=true")
-- Output:
-- Connecting to database 'dacFxRepro' on server '.'.
-- Extracting schema
-- Extracting schema from database
-- *** Error validating element [dbo].[UETrim]: Incorrect syntax near TRIM.
-- Resolving references in schema model
-- Validating schema model for data package
-- Validating schema
-- Successfully extracted database and saved it to file '...\dacFxRepro.dacpac'.
When trying to compare the dacpac-file to a database using library Microsoft.SqlServer.DacFx, schema differences of function UETrim are reported, although the functions are identical in the database and in the dacpac file.
Same with sqlpackage:
-- PS>
-- $outputPath = 'report.xml'
-- sqlpackage @('/Action:DeployReport ', "/SourceFile:$dacpacPath", "/TargetConnectionString:$connectionString", "/OutputPath:$outputPath")
-- Output
--
--
--
--
--
-- <Item Value="[dbo].[UETrim]"
-- Type="SqlScalarFunction"/>
--
--
-- <Item Value="[dbo].[UETrim]"
-- Type="SqlScalarFunction"/>
--
--
--
Did this occur in prior versions? If not - which version(s) did it work in?
Yes.
(DacFx/SqlPackage/SSMS/Azure Data Studio)
- Langage dominant
- GAP
- Étoiles
- 278
- Forks
- 46
- Merge moyen
- 9 j 23 h
- PR mergées (30 j)
- 2
Préparer son environnement
- Aucun Dockerfile ni fichier Docker Compose
- Propose un modèle de pull request
- Lire le guide de contribution
Par où commencer
- Lisez l'issue en entier, puis le guide de contribution du projet.
- Signalez en commentaire que vous la prenez — cela évite que deux personnes fassent le même travail.
- Forkez le dépôt et travaillez sur une branche.
- Ouvrez une pull request qui référence le numéro de l'issue.
Autres issues de microsoft/SqlScriptDOM
-
Difficulté 2/5 1-3 heures Accessibilité débutants 84/100
microsoft/SqlScriptDOM#228 ·
-
Difficulté 2/5 1-3 heures Accessibilité débutants 62/100
microsoft/SqlScriptDOM#183 ·
-
Add a Multiline option for CASE expressions (WHEN/THEN/ELSE on their own lines)Peut-être pris @trg-alasdair l’a pris il y a 7 jours. Ouverte
Difficulté 4/5 3-5 jours Accessibilité débutants 56/100
microsoft/SqlScriptDOM#226 · 1 réaction ·
-
Difficulté 4/5 3-5 jours Accessibilité débutants 48/100
microsoft/SqlScriptDOM#225 ·
-
Difficulté 3/5 1-2 jours Accessibilité débutants 58/100
microsoft/SqlScriptDOM#224 ·
Toutes les issues de microsoft/SqlScriptDOM
Issues similaires
-
Difficulté 2/5 Moins d'une heure Accessibilité débutants 78/100
opencart/opencart#15763 · 2 commentaires · 1 réaction ·
Les mainteneurs répondent en général sous 1 jour
-
Add: Chithiram LogoOuvertecheck:passed logos:add
Difficulté 1/5 Moins d'une heure Accessibilité débutants 66/100
Les mainteneurs répondent en général sous 9 jours
-
bug
Difficulté 2/5 1-3 heures Accessibilité débutants 75/100
Les mainteneurs répondent en général sous 1 jour
-
bug
Difficulté 2/5 1-3 heures Accessibilité débutants 90/100
Les mainteneurs répondent en général sous 3 jours
-
[2.x] Extension Manager: queued tasks fail on PostgreSQL (output NOT NULL, command varchar(50))Ouverte
Difficulté 2/5 1-3 heures Accessibilité débutants 78/100
Les mainteneurs répondent en général sous 1 jour