Skip to Main Content

Database Software

Announcement

For appeals, questions and feedback, please email oracle-forums_moderators_us@oracle.com

Virtual Columns and Enable Versioning

RafuFeb 23 2017 — edited Feb 27 2017

Are virtual columns supported for versioned tables? Is it mentioned somewhere that they are not supported? Using 12.1.0.2 release.

create table foo (

  bar NUMBER primary key,

  baz NUMBER GENERATED ALWAYS AS (

    bar*2

  ) VIRTUAL

);

call dbms_wm.enableversioning('foo');

Error starting at line : 8 in command -

call dbms_wm.enableversioning('foo')

Error report -

SQL Error: ORA-20229: statement 'DECLARE

       err_num   integer;

       err_msg   varchar2(1000);

       prfx_len  integer;

     be' failed during EnableVersioning. Error:

ORA-24344: success with compilation error

ORA-06512: at "WMSYS.LT", line 6126

ORA-06512: at line 1

Also alter table add virtual column fails at DBMS_WM.commitddl

create table foo2 (

  bar NUMBER primary key

);

call dbms_wm.enableversioning('FOO2');

exec DBMS_WM.BeginDDL('FOO2');

alter table FOO2_LTS add (baz AS ( bar*2 ));

exec DBMS_WM.commitddl('FOO2');

Error report -

ORA-00904: "BAR": invalid identifier

ORA-06512: at "WMSYS.LT", line 2868

ORA-06512: at line 1

00904. 00000 -  "%s: invalid identifier"

Comments
Locked Post
New comments cannot be posted to this locked post.
Post Details
Locked on Mar 27 2017
Added on Feb 23 2017
1 comment
550 views