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

Generating changelog fails for MSSQL 2019 when sys.synonyms exist #2044

Closed
catholic-indulgence-vaper opened this issue Aug 23, 2021 · 2 comments · Fixed by #2225
Closed

Generating changelog fails for MSSQL 2019 when sys.synonyms exist #2044

catholic-indulgence-vaper opened this issue Aug 23, 2021 · 2 comments · Fixed by #2225

Comments

@catholic-indulgence-vaper

Environment

Liquibase Version: 4.4.3

Liquibase Integration & Version: CLI

Liquibase Extension(s) & Version:

Database Vendor & Version: MSSQL 2019

Operating System Type & Version: Linux

Description

Generating changelog fails.

Steps To Reproduce

List the steps to reproduce the behavior.

  • ./liquibase generateChangeLog

Actual Behavior

Error thrown:
Unexpected error running Liquibase: Error executing SQL SELECT NULL AS SYNONYM_CATALOG_NAME, SCHEMA_NAME(SCHEMA_ID) as SYNONYM_SCHEMA_NAME, name as SYNONYM_NAME, NULL AS OBJECT_CATALOG_NAME, NULL AS OBJECT_SCHEMA_NAME, PARSENAME(BASE_OBJECT_NAME,1) AS OBJECT_NAME, PARSENAME(BASE_OBJECT_NAME,2) AS OBJECT_SCHEMA_NAME, PARSENAME(BASE_OBJECT_NAME,3) AS OBJECT_CATALOG_NAME FROM SYS.SYNONYMS WHERE SCHEMA_NAME(SCHEMA_ID)='dbo' AND name='some_table_name' AND IS_MS_SHIPPED='false': Invalid object name 'SYS.SYNONYMS'.

MSSQL 2019 fails when sys.synonyms is in upper case.

Expected/Desired Behavior

Changelog is generated.

MSSQL 2019 expects sys.synonyms to be in lower case.

@molivasdat
Copy link
Contributor

Hi @catholic-indulgence-vaper Thanks for creating this issue. Is the server running on Linux or are you running the from Linux. Is this a default configuration of MS SQL 2019? Just trying to get a sense to recreate this.

@catholic-indulgence-vaper
Copy link
Author

Hello, @molivasdat!
This is default MSSQL server running in Docker image with default parameters.

Just found out that dabases with collation Cyrillic_General_CI_AS do accept this query.
Databases with collation Cyrillic_General_BIN no not!

Example from Azure studio, database with Cyrillic_General_BIN:
PMStarted executing query at Line 1 Msg 208, Level 16, State 1, Line 1 Invalid object name 'SYS.SYNONYMS'. Total execution time: 00:00:00.001

@nvoxland nvoxland moved this from To Do to Code Review in Conditioning++ Nov 18, 2021
@nvoxland nvoxland moved this from Code Review to Ready for Handoff (In JIRA) in Conditioning++ Nov 24, 2021
Conditioning++ automation moved this from Ready for Handoff (In JIRA) to Done Dec 1, 2021
@nvoxland nvoxland added this to the v4.6.2 milestone Dec 1, 2021
@nvoxland nvoxland removed this from Done in Conditioning++ Dec 1, 2021
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Development

Successfully merging a pull request may close this issue.

3 participants