Skip to content

db2 column organized tables error on select #22

@roganp

Description

@roganp

Hello,

I get this error when selecting from column organized table:

ERROR: error executing query: OCIStmtExecute failed to execute remote query
DETAIL: SQLSTATE = 42858 SQLCODE = -1667
line=1484
file=db2_utils.c
[IBM][OCI Driver][DB2/LINUXX8664] SQL1667N The operation failed because the operation is not supported with the type of the specified table. Specified table: "WINGS_DW_MMIS_LEGACY.ZTEST". Table type: "ORGANIZE BY COLUMN". Operation: "WITH RR". SQLSTATE=42858

If I recreate the table as row organized explicitly, select works without error.

SELECT DB2_diag('bludb');

db2_diag | db2_fdw 1.0devel, PostgreSQL 12.2, DB2 client 11.1.3.0.0, DB2 server 11.01.0900

SELECT DB2_diag();

db2_diag | db2_fdw 1.0devel, PostgreSQL 12.2, DB2 client 11.1.3.0.0, DB2INSTANCE=db2inst1, DB2_HOME=/home/db2inst1/sqllib, DB2LIB=/home/db2\

dunno if this is related, found this report: https://www.ibm.com/support/pages/using-db2batch-query-involving-columnar-table-may-fail-sql1667n-error

Test case (this fails):

create table myschema.ztest (c1 varchar(128) not null) in ts_mmis_d_32k organize by column;
insert into myschema.ztest values ('test1');
insert into myschema.ztest values ('test2');

This does not:

create table myschema.ztest (c1 varchar(128) not null) in ts_mmis_d_32k organize by row;
insert into myschema.ztest values ('test1');
insert into myschema.ztest values ('test2');

Regards,
Peter

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions