Skip to Main Content

SQL & PL/SQL

Announcement

For appeals, questions and feedback about Oracle Forums, please email oracle-forums-moderators_us@oracle.com. Technical questions should be asked in the appropriate category. Thank you!

Interested in getting your voice heard by members of the Developer Marketing team at Oracle? Check out this post for AppDev or this post for AI focus group information.

ORA-12008: error in materialized view refresh path... Bug?

StainJan 25 2013 — edited Jan 26 2013
SQL> select * from v$version;

BANNER
--------------------------------------------------------------------------------
Oracle Database 11g Enterprise Edition Release 11.2.0.3.0 - 64bit Production
PL/SQL Release 11.2.0.3.0 - Production
CORE    11.2.0.3.0      Production
TNS for Linux: Version 11.2.0.3.0 - Production
NLSRTL Version 11.2.0.3.0 - Production

SQL> drop materialized view log on test_tbl;

Materialized view log dropped.

SQL> drop materialized view mv_test_tbl;

Materialized view dropped.

SQL> drop table test_tbl;

Table dropped.

SQL> create table test_tbl(
  2   test_id   number(10)   primary key,
  3   test_name varchar2(10) not null)
  4  ;

Table created.

SQL> insert into test_tbl values (1,'bob');

1 row created.

SQL> insert into test_tbl values (2,'joe');

1 row created.

SQL> insert into test_tbl values (3,'john');

1 row created.

SQL> commit;

Commit complete.

SQL> create materialized view log on test_tbl
  2  with primary key , rowid, sequence
  3  (
  4   test_name
  5  )
  6  including new values;

Materialized view log created.

SQL> create materialized view mv_test_tbl
  2  refresh fast on commit
  3  as
  4  select test_id,
  5         test_name
  6  from   test_tbl;

Materialized view created.

SQL> update test_tbl set test_name = 'hello' where test_id = 1000;

0 rows updated.

SQL> commit;

Commit complete.
Ok, so that's all good. Now if I create the materialized view log with the COMMIT SCN option:
SQL> drop materialized view log on test_tbl;

Materialized view log dropped.

SQL> drop materialized view mv_test_tbl;

Materialized view dropped.

SQL> create materialized view log on test_tbl
  2  with primary key , rowid, sequence
  3  (
  4   test_name
  5  ),
  6  commit scn
  7  including new values;

Materialized view log created.

SQL> create materialized view mv_test_tbl
  2  refresh fast on commit
  3  as
  4  select test_id,
  5         test_name
  6  from   test_tbl;

Materialized view created.

SQL> update test_tbl set test_name = 'hello' where test_id = 1000;

0 rows updated.

SQL> commit;
commit
*
ERROR at line 1:
ORA-12008: error in materialized view refresh path
ORA-01006: bind variable does not exist


SQL>
Committing an update that updates no rows against a master table for a single table fast refreshable materialized view results in the error above when the materialized view log on the master table is created with the COMMIT SCN option. I'm guessing that this isn't how things are supposed to work. Or am I missing something here? Anyone else encountered this before?

Cheers.

Edited by: Stain on Jan 25, 2013 1:27 PM
This post has been answered by Peter Gjelstrup on Jan 26 2013
Jump to Answer

Comments

Locked Post
New comments cannot be posted to this locked post.

Post Details

Locked on Feb 23 2013
Added on Jan 25 2013
5 comments
30,388 views