SQLCL Liquibase ORA-12899 error on genschema

Doug Phelps

    I am attempting to use the latest version of sqlcl (20.2)  and liquibase and it fails on the genschema command:

     

     

    SQL> lb genschema -debug

    [{log=false, replace=false, type=, password=, enable=true, context=, grants=false, silent=false, debug=true, runalways=false, synonyms=false, emit_schema=false, count=, changelog=, label=, runonchange=false, url=, command=genschema, fail=false, help=, filename=, report=true, name=, privs=true, user=}]

    [Type - TYPE_SPEC]:                           33 ms

    [Type - TYPE_BODY]:                           20 ms

    [Type - SEQUENCE]:                            96 ms

    [Type - DIRECTORY]:                           16 ms

    [Type - CLUSTER]:                             16 ms

    [Type - TABLE]:                             9703 ms

    [Type - MATERIALIZED_VIEW_LOG]:               27 ms

    [Type - MATERIALIZED_VIEW]:                   14 ms

    [Type - VIEW]:                              1262 ms

    [Type - REF_CONSTRAINT]:                     342 ms

    [Type - DIMENSION]:                           26 ms

    [Type - FUNCTION]:                           100 ms

    [Type - PROCEDURE]:                          250 ms

    [Type - PACKAGE_SPEC]:                       239 ms

    [Type - DB_LINK]:                             71 ms

    [Type - SYNONYM]:                            102 ms

    [Type - INDEX]:                              647 ms

    [Type - TRIGGER]:                           9180 ms

    [Type - PACKAGE_BODY]:                       665 ms

    [Type - JOB]:                                 31 ms

    [Method loadCaptureTable]:                 22840 ms

    java.sql.SQLException: ORA-12899: value too large for column "DDMN"."DATABASECHANGELOG_EXPORT"."DEP_NAME" (actual: 449, maximum: 200)

     

            at oracle.jdbc.driver.T2CConnection.checkError(T2CConnection.java:1002)

            at oracle.jdbc.driver.T2CConnection.checkError(T2CConnection.java:898)

            at oracle.jdbc.driver.T2CPreparedStatement.executeForDescribe(T2CPreparedStatement.java:686)

            at oracle.jdbc.driver.T2CPreparedStatement.executeForRows(T2CPreparedStatement.java:942)

            at oracle.jdbc.driver.OracleStatement.doExecuteWithTimeout(OracleStatement.java:1150)

            at oracle.jdbc.driver.OraclePreparedStatement.executeInternal(OraclePreparedStatement.java:4798)

            at oracle.jdbc.driver.OraclePreparedStatement.executeUpdate(OraclePreparedStatement.java:4875)

            at oracle.jdbc.driver.OraclePreparedStatementWrapper.executeUpdate(OraclePreparedStatementWrapper.java:1361)

            at liquibase.ext.ora.generator.Generator.updateCaptureTable(Generator.java:694)

            at liquibase.ext.ora.generator.Generator.processCaptureTable(Generator.java:846)

            at liquibase.ext.ora.generator.Generator.doSchemaExport(Generator.java:980)

            at oracle.dbtools.raptor.scriptrunner.commands.liquibase.liquibaseCommand.genSchema(liquibaseCommand.java:707)

            at oracle.dbtools.raptor.scriptrunner.commands.liquibase.liquibaseCommand.handleEvent(liquibaseCommand.java:219)

            at oracle.dbtools.raptor.newscriptrunner.CommandRegistry.fireListeners(CommandRegistry.java:346)

            at oracle.dbtools.raptor.newscriptrunner.ScriptRunner.run(ScriptRunner.java:226)

            at oracle.dbtools.raptor.newscriptrunner.ScriptExecutor.run(ScriptExecutor.java:344)

            at oracle.dbtools.raptor.newscriptrunner.ScriptExecutor.run(ScriptExecutor.java:227)

            at oracle.dbtools.raptor.scriptrunner.cmdline.SqlCli.process(SqlCli.java:410)

            at oracle.dbtools.raptor.scriptrunner.cmdline.SqlCli.processLine(SqlCli.java:421)

            at oracle.dbtools.raptor.scriptrunner.cmdline.SqlCli.startSQLPlus(SqlCli.java:1179)

            at oracle.dbtools.raptor.scriptrunner.cmdline.SqlCli.main(SqlCli.java:502)

     

     

    Export Flags Used:

     

    Export Grants           false

    Export Synonyms         false

    Processing has failed for your request.

    Location

    updateCaptureTable

    Message

    ORA-12899: value too large for column "DDMN"."DATABASECHANGELOG_EXPORT"."DEP_NAME" (actual: 449, maximum: 200)

     

     

    Operation completed successfully all locks on  released.

    SQL> version

    Oracle SQLDeveloper Command-Line (SQLcl) version: 20.2.0.0 build: 20.2.0.174.1557

      • 1. Re: SQLCL Liquibase ORA-12899 error on genschema
        thatJeffSmith-Oracle

        thanks, you caught us on a holiday break..i've asked the dev to take a look at this ASAP, and will get back to you

        • 2. Re: SQLCL Liquibase ORA-12899 error on genschema
          skutz-Oracle

          Well this is a bug on my part. You must be using large object names and/or have an object with a large number of dependents. It failing when it's trying to log the dependents for an object to the DATABASECHANGELOG_EXPORT table.

           

          I don't see an easy way to work around this as I clean it all up when it fails and this is a table that does not persist. Short of a patch, you will need to either remove the object or shorten the names of the objects it depends on.

           

          To figure out the object that's causing you the issue:

           

          select max(seq) ,type from DATABASECHANGELOG_EXPORT where DEP_NAME is null group by type;

           

          Then you can query up the object_name based on those results.

           

          So a workaround flow once you know the offending object:

           

          Do a genobject on it then modify it / remove it, then do a genschema.

           

          I will change the structure of that transient table to ensure this does not happen any more.

           

          Thanks

          • 3. Re: SQLCL Liquibase ORA-12899 error on genschema
            Doug Phelps

            Unable to run the select. That table is dropped when the error occurs.

            I suspect it is a large # of dependencies.  Max object name is 30 characters.

             

            I may attempt to get a trace of the failure and see if that shows anything.