When using scripts for cloning a schema from this or this source, it works perfectly ok in Oracle 11g we are using. Recently we switched to Oracle 19c and cloning doesn't work properly anymore. While, at first glance, everything looks ok, on closer inspection, index organized tables are empty. When I checked the structure of these tables, indexes and constraints were missing.
The example of index organized table in the source schema:
CREATE TABLE some_table
(
id1 INTEGER NOT NULL,
id2 INTEGER NOT NULL,
CONSTRAINT pk_some_table PRIMARY KEY (id1, id2) ENABLE VALIDATE
)
ORGANIZATION INDEX
/
CREATE INDEX ix_some_table_01
ON some_table (id1)
/
CREATE INDEX ix_some_table_02
ON some_table (id2)
/
ALTER TABLE some_table
ADD (CONSTRAINT fk_some_table_01 FOREIGN KEY (id1) REFERENCES parent_table1 (id) ENABLE VALIDATE)
/
ALTER TABLE some_table
ADD (CONSTRAINT fk_some_table_02 FOREIGN KEY (id2) REFERENCES parent_table2 (id) ENABLE VALIDATE)
/
And the same table in the destination (cloned) schema:
CREATE TABLE some_table
(
id1 INTEGER NOT NULL,
id2 INTEGER NOT NULL,
CONSTRAINT pk_some_table PRIMARY KEY (id1, id2) ENABLE VALIDATE
)
ORGANIZATION INDEX
/
And, as I mentioned, no data is cloned and cloned index organized tables are left empty. I suspect that cloning procedure tries to create constraints (using indexes) before indexes themselves and it fails, but I'm not sure that this is the cause.
Any help would be appreciated. Thanks!
Thanks for using my script :-) but sorry I can't reproduce in 19.14