做資料庫同步實驗的時候建立prebuilt mv 時 總是提示 ora-32349 ,查詢metalink後,發現這是一個bug。。。。
yang@rac1>create materialized view yangtab2
2 on prebuilt table refresh fast
3 as select * from yangtab2@linkyang;
create materialized view yangtab2
*
error at line 1:
ora-32349: cannot reference prebuilt table in definition query for materialized view
yang@rac1>alter table yangtab2 add constraint pk_yangtab2 primary key (id);
table altered.
create materialized view yangtab2
bug 9369183: mview with prebuilt table on select from remote table returns ora-32349
顯示 bug 屬性 bug 屬性
類型 b - defect 已在産品版本中修複 12.1
嚴重性 2 - severe loss of service 産品版本 11.2.0.1
狀态 80 - development to q/a 平台 46 - linux x86
建立時間 10-feb-2010 平台版本 no data
更新時間 23-dec-2010 基本 bug 6815375
資料庫版本 11.2.0.1
影響平台 generic
産品源 oracle
顯示相關産品 相關産品
産品線 oracle database products 系列 oracle database
區域 oracle database 産品 5 - oracle server - enterprise edition
hdr: 9369183 11.2.0.1 rdbms 11.2.0.1 material_view prodid-5 portid-46 6815375
abstract: mview with prebuilt table on select from remote table returns ora-32349
*** 02/10/10 08:30 pm ***
bug type chosen
===============
code
subcomponent: materialized views
================================
detailed problem description
============================
the ability to create an materialized view on prebuilt table with the same
name as a remote table exists in 9i, 10g, and 11r1, but does not exist in
11r2, hence the creation of this bug for 11r2.
test scenario:
create table as user abc in 9i database, and as user abc in 11r2 database
(tested in 9.2.0.8 and 11.2.0.1):
create table test
( id number,
val number,
val2 varchar2(30),
val3 clob,
primary key (id));
create database link (tested private dblink for user abc, connecting to abc
in remote db) from 11r2 to 9i.
in remote db) from 9i to 11r2.
in 9i, as user abc, issue:
create materialized view test on prebuilt table for update as select * from
test@;
materialized view created.
- note that the mview/prebuilt table have the same name/same schema as the
remote table in select clause of definition query
- you can do the above test above in 10g and 11r1, and you will be able to
successfully create the mview.
- please also note that you can successfully create the mview if the test
table exists locally but in a different schema.
drop the mview, then do the following:
in 11r2, as user abc, issue:
test@strm92p
error at line 1:
ora-32349: cannot reference prebuilt table in definition query for
materialized view
- this error is returned for this test in 11r2 only.
note that bug 6815375 addressed an ora-4020 returned on creation of mview
with prebuilt table where prebuilt table is referenced as local table in
definition query. this bug was resolved with return of ora-32349 for
action. unfortunately, this error is now returned on mview with prebuilt
table where prebuilt table is referenced as remote table in definition query
(where the ora-4020 did not occur in prior releases).
diagnostic analysis
===================
see above
workaround?
===========
yes
workaround information
======================
create prebuilt table using different name as remote table in definition
query. however, for customer of this bug, plan is to drop mview in future
with resultant change of prebuilt table to regular table - customer wants
this table to have same name as remote table. this is a reasonable request,
as this worked previously without ora-4020 or other error.
technical impact
================
see above
related issues (bugs, forums, rfas)
===================================
bug 6815375 - attempt to create a mv with 'on prebuilt table' results in a
deadlock
how often does the issue reproduce at customer site?
====================================================
always
does the issue reproduce internally?
====================================
is a testcase available?
========================