liquibase / liquibase

Main Liquibase Source
https://www.liquibase.org
Apache License 2.0
4.63k stars 1.84k forks source link

Liquibase doesn't recognize Database "SAP IQ" on update #2051

Open szandany opened 3 years ago

szandany commented 3 years ago

Environment

Liquibase Version: 4.4.3

Liquibase Integration & Version: CLI

Database Vendor & Version: Sybase SAP IQ

Operating System Type & Version: Windows, Linux.

Description

It appears that Liquibase doesn't recognize Database "SAP IQ".

Steps To Reproduce

Have the following properties setup with jconn4.jar jdbc driver

url: jdbc:sybase:Tds:localhost:2638/iqdemo
username: dba
password: password
classpath: path/to/jconn4.jar
driver: com.sybase.jdbc4.jdbc.SybDataSource

Actual Behavior

The following message appears.

instance liquibase.database.core.UnsupportedDatabase
[2021-08-18 15:38:08] FINE [liquibase.database] Properties:
[2021-08-18 15:38:08] FINE [liquibase.database] Key:'user' Value:'user1'
[2021-08-18 15:38:08] FINE [liquibase.database] Key:'password' Value:'**********'
[2021-08-18 15:38:08] FINE [liquibase.database] Connecting to the URL:'jdbc:sybase:Tds:hostname:2638/devdb' using driver:'com.sybase.jdbc4.jdbc.SybDataSource'
[2021-08-18 15:38:08] FINE [liquibase.servicelocator] Loaded liquibase.database.DatabaseConnection instance liquibase.database.jvm.JdbcConnection
[2021-08-18 15:38:08] FINE [liquibase.servicelocator] Loaded liquibase.database.DatabaseConnection instance com.datical.liquibase.ext.database.jvm.ProJdbcConnection
[2021-08-18 15:38:08] FINE [liquibase.database] Connection has been created
[2021-08-18 15:38:09] WARNING [liquibase.database] Unknown database: SAP IQ

This later causes issues with setting the DBCL LOCK table with incompatible bool datatype instead of bit type since the default fallback database type is the "UnsupportedDatabase".

Expected/Desired Behavior

Liquibase should be able to identify the SAP IQ database and handle the tracking tables correctly.

molivasdat commented 3 years ago

Hi @szandany Thanks for writing up this issue. We will add it the list of issues that we are processing.

pradeepviswa commented 2 years ago

I am also facing similar issue I am using Liquibase Version 4.5.0

Database: Sybase IQ 16

It verifies database connection detail and credential and gives this output Connection has been created Unknown database: SAP IQ

After few detail it gives this Error: Error executing SQL call cruuent_schema: SQL: Anywhere Error -256” Procedure ‘Current_schema’ not found

fabiencrassat commented 2 years ago

Hello all,

We have the same issue after patching Sybase IQ 16:

I tested different Liquibase version and the issue is always here: 3.5.5, 4.0.0, 4.3.5.

Also, we had kind of the same issue with Workbench application where we fixed it changing the application name in configuration setting file:

The impact we have today is that we can not compare anymore Stored Procedures between code and the IQ database. A little example can help:

[...]
PR�CIS [liquibase.database] Connection has been created
PR�CIS [liquibase.database] Connected to USER@jdbc:sybase:Tds:URL_TO_IQ_SP04.04:PORT/IQ
PR�CIS [liquibase.database] Setting auto commit to false from true
[...]
PR�CIS [liquibase.changelog] Reading ChangeSet: SQL/changeLogs/IQ/procs/IQ.procs-changelog-master.xml::spDB_foo.sql::author
PR�CIS [liquibase.database] Executing Statement: create or replace procedure SCHEMA.spDB_foo
as
begin
  PRINT 'IQ SCHEMA.spDB_foo stored procedure called successfully!'
end;
INFOS [liquibase.changelog] SQL in file SQL\referential\IQ\procs\spDB_foo.sql executed
INFOS [liquibase.changelog] ChangeSet SQL/changeLogs/IQ/procs/IQ.procs-changelog-master.xml::spDB_foo.sql::author ran successfully in 20ms
PR�CIS [liquibase.executor] Executing with the 'jdbc' executor
[...]
PR�CIS [liquibase.database] Connection has been created
AVERTISSEMENT [liquibase.database] Unknown database: SAP IQ
PR�CIS [liquibase.database] Connected to USER@jdbc:sybase:Tds:URL_TO_IQ_SP04.09:PORT/IQ
PR�CIS [liquibase.database] Setting auto commit to false from true
[...]
PR�CIS [liquibase.changelog] Reading ChangeSet: SQL/changeLogs/IQ/procs/IQ.procs-changelog-master.xml::spDB_foo.sql::author
PR�CIS [liquibase.changelog] Change sqlFile not included for database unsupported
INFOS [liquibase.changelog] ChangeSet SQL/changeLogs/IQ/procs/IQ.procs-changelog-master.xml::spDB_foo.sql::author ran successfully in 13ms
PR�CIS [liquibase.executor] Executing with the 'jdbc' executor
[...]

I think from here https://github.com/liquibase/liquibase/blob/master/liquibase-core/src/main/java/liquibase/database/core/SybaseASADatabase.java#L181 there is not the new SAP IQ application name in the list. That should be added?

And to conclude, it is a blocking issue from us. So do you have workaround or can you priorize the fix soon?

prashantsawant06 commented 1 year ago

I am also facing similar issue. What is plan to rollout fix for this. Please let me know if there is tentative timeline. Also please help to know if there is workaround till permanent fix is available.

ClodoaldoHA commented 3 months ago

I am also facing similar issue. @prashantsawant06 do you find workaround fix this problem?

Starting Liquibase at 16:53:25 (version 4.28.0 #2272 built at 2024-05-16 19:00+0000) Liquibase Version: 4.28.0 Liquibase Open Source 4.28.0 by Liquibase ERROR: Exception Details ERROR: Exception Primary Class: SybSQLException ERROR: Exception Primary Reason: SQL Anywhere Error -131: Syntax error near 'BOOLEAN' on line 1 ERROR: Exception Primary Source: SAP IQ SAP IQ/16.1.050.2612/14315/P/SP05.12/Linux/Linux64 - x86_64 - 3.10.0-327/64bit/2024-03-04 01:37:20

Unexpected error running Liquibase: SQL Anywhere Error -131: Syntax error near 'BOOLEAN' on line 1 [Failed SQL: (102) CREATE TABLE gestaocontabil.DATABASECHANGELOGLOCK (ID INT NOT NULL, LOCKED BOOLEAN NOT NULL, LOCKGRANTED datetime, LOCKEDBY VARCHAR(255), CONSTRAINT PK_DATABASECHANGELOGLOCK PRIMARY KEY (ID))]