Materialized Views appear twice - under MV and under tables
448810Feb 11 2007 — edited Feb 13 2007Hi,
I've encountered a wierd issue.
It seems that every materialized view is also appearing under the tables tab.
For example sh.cal_month_sales_mv. Another example, run this as sh:
CREATE MATERIALIZED VIEW SH.OFIR_MV
REFRESH FORCE ON DEMAND
ENABLE QUERY REWRITE
AS SELECT sum(s.amount_sold) AS dollars
FROM sales s;
You'll see a table OFIR_MV under the table tab. If you try to drop it(right-click-> table-> drop), you get ora-12083 must use DROP MATERIALIZED VIEW to drop "SH"."OFIR_MV"
Also, SQL tab of the "table" has the folowing remark
-- DBMS_METADATA was unable to use TABLE_EXPORT to generate sql. Now trying to use TABLE
I guess this is the source of the issue:
select object_name,object_type from user_objects where object_name = 'OFIR_MV';
OBJECT_NAME OBJECT_TYPE
---------------------------------------------- -------------------
OFIR_MV TABLE
OFIR_MV MATERIALIZED VIEW
2 rows selected
So, creating a MV also adds a table to user_objects/tables. (Huh? that suprised me)
Could SQL Dev filter these fake tables or at least have a different icon/color for them?
Thanks.
Ofir
BTW - Win XP, 10.2.0.3EE, SQL Dev 1.1.1.25.14