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

SqlTrigger not working in with Azure SQL Database collated Finnish_Swedish_CI_AI #1036

Open
jakehatinen opened this issue Feb 4, 2024 · 3 comments
Assignees
Labels
bug Something isn't working Needs Logs P0
Milestone

Comments

@jakehatinen
Copy link

  • Azure Functions SQL Extension or Extension Bundle Version: 3.0.461
  • Is this a deployed or local function: local
  • What type of Database are you using? Microsoft SQL Azure (RTM) - 12.0.2000.8
    Jan 3 2024 16:32:18
    Copyright (C) 2022 Microsoft Corporation
  • List any custom settings for your function app. This could be a custom time-out defined specifically for your database server or optional configuration that can be customized for the app defined here.

Steps to Reproduce:

  1. Azure SQL Database with collation Finnish_Swedish_CI_AI
  2. Create table with above collation with some nvarchar and varchar columns
  3. Turn on database server change tracking
  4. Turn on table change tracking
  5. Create function with SqlTrigger to above table
  6. Run function
  7. Function failes with error: Failed to check for changes in table 'Tablename' due to exception: Microsoft.Data.SqlClient.SqlException. Exception message: Cannot resolve the collation conflict between "Finnish_Swedish_CI_AI" and "SQL_Latin1_General_CP1_CI_AS" in the equal to operation.
@chlafreniere chlafreniere added bug Something isn't working P0 labels Feb 5, 2024
@chlafreniere chlafreniere added this to the Post GA milestone Feb 5, 2024
Copy link

We need more info to debug your particular issue. If you could attach your logs to the issue, it would help us fix the issue much faster.
Note that these instructions are for local development only.

  1. Set the default logging level to Debug and enable logging to a file. To do this ensure the following entries are in your host.json. (instructions)
{
  "logging": {
    "fileLoggingMode": "always",
    "logLevel": {
      "default": "Debug"
    }
  }
}
  1. Restart your function and reproduce your issue

  2. Get the log file and attach it to this issue. By default this will be in %TMP%/LogFiles/Application/Functions/Host.

NOTE Debug logging will include information such as Database and table names, if you do not wish to include this information you can either redact it from the logs before attaching or let us know and we will provide a way to send logs directly to us.

@MaddyDev
Copy link
Contributor

@jakehatinen I couldn't repro the issue on my local function on SQL 16 version. Going to try installing the specified version and try to see if I can repro the issue, meanwhile can you share logs.

@jakehatinen
Copy link
Author

Hi, thanks for the reply.

Logs attached. Tested with table created with following:

create table TestTable ( First nvarchar(1000) collate SQL_Latin1_General_CP1_CI_AS, Second nvarchar(20) collate SQL_Latin1_General_CP1_CI_AS, Partition nvarchar(20) collate Finnish_Swedish_CI_AI, constraint PK_VendVendorPostalAddressStaging primary key (Partition, Second) )

In Azure Database db collated Finnish_Swedish_CI_AI
2024-02-27T06-38-09Z-i9.log

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
bug Something isn't working Needs Logs P0
Projects
None yet
Development

No branches or pull requests

3 participants