sysproc.env_get_inst_info() does not exist

Description

The SQL "SELECT fixpack_num FROM TABLE (sysproc.env_get_inst_info()) as INSTANCEINFO" throws an exception because sysproc.env_get_inst_info() does not exist. The procedure exists only for DB2 on LUW. The error will be thrown at z/OS and IBM i.

I saw in source code that the SQL is used in 3.8.x too, but I did not test it.

Error getting fix pack number
liquibase.exception.DatabaseException: Error executing SQL SELECT fixpack_num FROM TABLE (sysproc.env_get_inst_info()) as INSTANCEINFO: [SQL0204] ENV_GET_INST_INFO der Art *N in SYSPROC nicht gefunden.
at liquibase.executor.jvm.JdbcExecutor.execute(JdbcExecutor.java:72)
at liquibase.executor.jvm.JdbcExecutor.query(JdbcExecutor.java:145)
at liquibase.executor.jvm.JdbcExecutor.query(JdbcExecutor.java:153)
at liquibase.executor.jvm.JdbcExecutor.queryForObject(JdbcExecutor.java:161)
at liquibase.executor.jvm.JdbcExecutor.queryForObject(JdbcExecutor.java:176)
at liquibase.executor.jvm.JdbcExecutor.queryForObject(JdbcExecutor.java:171)
at liquibase.database.core.DB2Database.getDb2FixPack(DB2Database.java:51)
at liquibase.database.core.DB2Database.supportsBooleanDataType(DB2Database.java:34)
at liquibase.datatype.core.BooleanType.isNumericBoolean(BooleanType.java:107)
at liquibase.datatype.core.BooleanType.getFalseBooleanValue(BooleanType.java:119)
at liquibase.datatype.core.BooleanType.objectToSql(BooleanType.java:94)
at liquibase.datatype.DataTypeFactory.getFalseBooleanValue(DataTypeFactory.java:296)
at liquibase.sqlgenerator.core.InsertGenerator.generateValues(InsertGenerator.java:81)
at liquibase.sqlgenerator.core.InsertGenerator.generateSql(InsertGenerator.java:42)
at liquibase.sqlgenerator.core.InsertGenerator.generateSql(InsertGenerator.java:16)
at liquibase.sqlgenerator.SqlGeneratorChain.generateSql(SqlGeneratorChain.java:30)
at liquibase.sqlgenerator.SqlGeneratorFactory.generateSql(SqlGeneratorFactory.java:222)
at liquibase.sqlgenerator.core.InitializeDatabaseChangeLogLockTableGenerator.generateSql(InitializeDatabaseChangeLogLockTableGenerator.java:33)
at liquibase.sqlgenerator.core.InitializeDatabaseChangeLogLockTableGenerator.generateSql(InitializeDatabaseChangeLogLockTableGenerator.java:16)
at liquibase.sqlgenerator.SqlGeneratorChain.generateSql(SqlGeneratorChain.java:30)
at liquibase.sqlgenerator.SqlGeneratorFactory.generateSql(SqlGeneratorFactory.java:222)
at liquibase.executor.AbstractExecutor.applyVisitors(AbstractExecutor.java:25)
at liquibase.executor.jvm.JdbcExecutor.access$600(JdbcExecutor.java:40)
at liquibase.executor.jvm.JdbcExecutor$ExecuteStatementCallback.doInStatement(JdbcExecutor.java:384)
at liquibase.executor.jvm.JdbcExecutor.execute(JdbcExecutor.java:59)
at liquibase.executor.jvm.JdbcExecutor.execute(JdbcExecutor.java:131)
at liquibase.executor.jvm.JdbcExecutor.execute(JdbcExecutor.java:111)
at liquibase.lockservice.StandardLockService.init(StandardLockService.java:128)
at liquibase.lockservice.StandardLockService.acquireLock(StandardLockService.java:252)
at liquibase.lockservice.StandardLockService.waitForLock(StandardLockService.java:213)
at liquibase.Liquibase.update(Liquibase.java:184)
at liquibase.Liquibase.update(Liquibase.java:179)
at liquibase.integration.commandline.Main.doMigration(Main.java:1206)
at liquibase.integration.commandline.Main.run(Main.java:192)
at liquibase.integration.commandline.Main.main(Main.java:130)
Caused by: com.ibm.as400.access.AS400JDBCSQLSyntaxErrorException: [SQL0204] ENV_GET_INST_INFO der Art *N in SYSPROC nicht gefunden.
at com.ibm.as400.access.JDError.createSQLExceptionSubClass(JDError.java:945)
at com.ibm.as400.access.JDError.throwSQLException(JDError.java:742)
at com.ibm.as400.access.AS400JDBCStatement.commonPrepare(AS400JDBCStatement.java:1790)
at com.ibm.as400.access.AS400JDBCStatement.executeQuery(AS400JDBCStatement.java:2517)
at liquibase.executor.jvm.JdbcExecutor$QueryStatementCallback.doInStatement(JdbcExecutor.java:465)
at liquibase.executor.jvm.JdbcExecutor.execute(JdbcExecutor.java:59)
... 34 common frames omitted

Environment

DB2 on IBM i

Reporter

Stefan

Components

Affects versions

Priority

Minor
Configure