Informix

Informix

Connect with Db2, Informix, Netezza, open source, and other data experts to gain value from your data, share insights, and solve problems.

 View Only
  • 1.  Databases schema management tools for Informix

    Posted 24 days ago

    Hi!

    I would like to ask some suggestion about  a database CI/CD and schema migration change tool for Informix (14.10). 

    Our operation is using a lot of SP-s. Maybe somebody is using a similar tools (Liquibase, Flyway). Our problem is when the deployment want to compile the SP in a database and the first ";" character is causing an issue.

     



    ------------------------------
    Gábor Fekete
    Software Engineer
    Capital Systems
    Budapest
    ------------------------------


  • 2.  RE: Databases schema management tools for Informix

    Posted 24 days ago

    Gábor:

    Not sure what you are asking for. What about the "first ;"? I assume you mean the semi-colon after the CREATE PROCEDURE/FUNCTION statement? What about it?

    Art



    ------------------------------
    Art S. Kagel, President and Principal Consultant
    ASK Database Management Corp.
    www.askdbmgt.com
    ------------------------------



  • 3.  RE: Databases schema management tools for Informix

    Posted 24 days ago
    Hi Art,
    Yes I have a problem with the semi-colons in the SP definition, becase the liquibase didn't want to use my endDelimiter attributum. (I tryed more delimiter but always get a similar error.)
    I'm using the JDBC 4.50.11.2 driver in the liquibase. The liquibase is a latest 4.33.
    Maybe I didn't configured the liquibase properly
    --liquibase formatted sql
    --changeset gabor.fekete:2 context:2025_1 labels:13694 endDelimiter="procedure;" splitStatements="false" stripComments="false"
    execute procedure drop_routine( 'tikv2_modlogtrigproc' );
    create procedure "zeus1000".tikv2_modlogtrigproc(
    _tikazon integer {serial},
    _tikgmrkod varchar(50),
    _tikertek smallint,
    _modtip char(1)
    )
    define prevazon integer;
    define most datetime year to second;
    insert into table ()
     values ();
    end procedure;

    ERROR: Exception Primary Source:  Informix Dynamic Server 14.10.FC10W2X3

    Unexpected error running Liquibase: Migration failed for changeset src/tik_modlogtrigproc.sql::2::gabor.fekete:
         Reason: liquibase.exception.DatabaseException: A syntax error has occurred. [Failed SQL: (-201) create procedure "zeus1000".tikv2_modlogtrigproc(
                    _tikazon        integer {serial},
                    _tikgmrkod      varchar(50),
                    _tikertek       smallint,
                    _modtip         char(1)
            )

            define prevazon         integer]



    ------------------------------
    Gábor Fekete
    Software Engineer
    Capital Systems
    Budapest
    ------------------------------



  • 4.  RE: Databases schema management tools for Informix

    Posted 24 days ago

    You are missing the semi-colon at the end of the CREATE line itself. The definition should be:

    create procedure "zeus1000".tikv2_modlogtrigproc(
    _tikazon integer {serial},
    _tikgmrkod varchar(50),
    _tikertek smallint,
    _modtip char(1)
    ) ;
    define prevazon integer;
    define most datetime year to second;
    insert into table ()
     values ();
    end procedure;
    Try that.


    ------------------------------
    Art S. Kagel, President and Principal Consultant
    ASK Database Management Corp.
    www.askdbmgt.com
    ------------------------------



  • 5.  RE: Databases schema management tools for Informix

    Posted 24 days ago

    Oops, no, looking again you do not have a table name in the INSERT statement, that is the syntax error!

    Art



    ------------------------------
    Art S. Kagel, President and Principal Consultant
    ASK Database Management Corp.
    www.askdbmgt.com
    ------------------------------



  • 6.  RE: Databases schema management tools for Informix

    Posted 24 days ago

    Ohh yes,that semi-colons is missing, but after I fixed the code the error almost same as earlier. ( I missed the semi-colons because dbaccess can handle that way.)

    The table name is missing because i want to simplify the code sample. I uploaded the original SP as a file.

    Unexpected error running Liquibase: Migration failed for changeset src/tik_modlogtrigproc.sql::2::gabor.fekete:
         Reason: liquibase.exception.DatabaseException: A syntax error has occurred. [Failed SQL: (-201) create procedure "zeus1000".tikv2_modlogtrigproc(
                    _tikazon        integer {serial},
                    _tikgmrkod      varchar(50),
                    _tikertek       smallint,
                    _modtip         char(1)
            )]



    ------------------------------
    Gábor Fekete
    Software Engineer
    Capital Systems
    Budapest
    ------------------------------



  • 7.  RE: Databases schema management tools for Informix

    Posted 24 days ago

    OK , but "table" is a keyword, so I still think that "INSERT INTO table ()...." is the syntax error. Try:

    INSERT INTO sometab() ...

    and see if you don't get a 206 error instead:

    -206    The specified table <table-name> is not in the database.
     
    The database server cannot find a table or view specified in the statement.
    The table or view might have been renamed or dropped from the database.
     
    You might also get this message if you omit the keyword "TYPE" when you are
    trying to grant USAGE privileges on a user-defined type. For example, the
    following GRANT statement is correct:



    ------------------------------
    Art S. Kagel, President and Principal Consultant
    ASK Database Management Corp.
    www.askdbmgt.com
    ------------------------------



  • 8.  RE: Databases schema management tools for Informix

    Posted 24 days ago

    I can create the SP directly in the database from our source code with dbaccess.

    My problem occuring, when I want do it with liquibase.



    ------------------------------
    Gábor Fekete
    Software Engineer
    Capital Systems
    Budapest
    ------------------------------



  • 9.  RE: Databases schema management tools for Informix

    Posted 24 days ago

    Sounds like liquibase is the issue. There are other SQL Editors that work well with Informix including Informix's own HQ. I know that SQuirreL works as does DBeaver Community Edition. If you want an ERD tool, I like Dezign for Database from Datanamics.



    ------------------------------
    Art S. Kagel, President and Principal Consultant
    ASK Database Management Corp.
    www.askdbmgt.com
    ------------------------------