DBMS_WM.CommitDDL Fails With Ora-00904 Trying To Add A Column To Version Enabled Table

(Doc ID 1970031.1)

Last updated on FEBRUARY 08, 2017

Applies to:

Workspace Manager - Version 11.2.0.4 to 11.2.0.4 [Release 11.2]
Information in this document applies to any platform.

Goal

On Oracle Database version 11.2.0.4 version
Product: Workspace Manager

DBMS_WM.CommitDDL fails with ora-00904 trying to add a column to version enabled table

Below is the code that generated the error:

EXECUTE DBMS_WM.DisableVersioning ('WM_TEST');
drop table wm_test;
create table wm_test(id number(5) primary key);
EXECUTE DBMS_WM.EnableVersioning ('WM_TEST');
EXECUTE DBMS_WM.BeginDDL('WM_TEST');
ALTER TABLE WM_TEST_LTS ADD (COL2 NUMBER(1, 0) DEFAULT 0 NOT NULL);
EXECUTE DBMS_WM.CommitDDL('WM_TEST');

Table created.
SQL>
PL/SQL procedure successfully completed.
SQL>
PL/SQL procedure successfully completed.
SQL>
Table altered.
SQL>
BEGIN DBMS_WM.CommitDDL('WM_TEST'); END;
*
ERROR at line 1:
ORA-00904: "COL2": invalid identifier
ORA-06512: at "WMSYS.LT", line 12487
ORA-06512: at line 1

 

This works in 12.1 but does not work in 11.2.0.4

Question: How to add a column not null and Default values in 11.2.0.4
 

Solution

Sign In with your My Oracle Support account

Don't have a My Oracle Support account? Click to get started

My Oracle Support provides customers with access to over a
Million Knowledge Articles and hundreds of Community platforms