MATERIALIZED VIEW becamed to ZOMBIE :(  What Can I do ?

Hi! Can anybody give me an advice about this ?
look:
10:27:23 ARCGIS2@sgp >drop MATERIALIZED VIEW "ARCGIS"."GP_CP_P_VIEW";
Materialized view dropped.
10:27:28 ARCGIS2@sgp >drop MATERIALIZED VIEW "ARCGIS"."GP_CP_P_VIEW";
Materialized view dropped.
10:27:31 ARCGIS2@sgp >alter MATERIALIZED VIEW "ARCGIS"."GP_CP_P_VIEW" compile;
alter MATERIALIZED VIEW "ARCGIS"."GP_CP_P_VIEW" compile
ERROR at line 1:
ORA-12003: materialized view "ARCGIS"."GP_CP_P_VIEW" does not exist
10:27:32 ARCGIS2@sgp >select count(*) from "ARCGIS"."GP_CP_P_VIEW";
COUNT(*)
0
10:31:55 ARCGIS2@sgp >select * from v$version;
BANNER
Oracle Database 10g Enterprise Edition Release 10.2.0.2.0 - 64bi
PL/SQL Release 10.2.0.2.0 - Production
CORE 10.2.0.2.0 Production
TNS for Linux: Version 10.2.0.2.0 - Production
NLSRTL Version 10.2.0.2.0 - Production

Nope, drop table do not work. It told me that i must use drop materil.. view.
I deleted two records from obj$ and restart database.
An ugly solution for stupid dude ;(

Similar Messages

  • Hi, the preview view does not open. what can I do?

    Hi everyone, I have an issue with the preview view application, I cannot open PDF or any type of document. When I try to do it this error come up: The preview view could not be open - 1712. Do you know how can I fix this?
    Thank you.

    For Windows:
    http://trials2.adobe.com/AdobeProducts/APRO/11/win32/AcrobatPro_11_Web_WWMUI.exe
    For MAC:
    http://trials2.adobe.com/AdobeProducts/APRO/11/osx10/AcrobatPro_11_Web_WWMUI.dmg
    ACROBAT XI

  • Hi experts pls help me with this materialized view refresh time!!!

    Hi Expeerts ,
    Please clarify my doubt about this materialized view code
    [\n]
    CREATE MATERIALIZED VIEW SCHEMANAME.products_mv
    REFRESH WITH ROWID
    AS SELECT * from VIEW_TABLE@DATAOPPB;
    [n]
    Here i am creating a materialized view named products_mv of the view_table present in the remote server.Can anyone tell me when will my table product_mv will get refreshed if i follow this code.As what i read from the books is that the refresh period is implicit and is carried out by the database implicitly.so can u tell me suppose i insert 2 new records into my view_table when will this record get updated into my product_mv table.
    I cant use primary key approach so this is the approach i am following .Kindly help me in understanding when will refresh of records occur in the materialized view product_mv...Pls help
    regards
    debashis

    Hi Justin ,
    Yes, my database can reasonably schedule other jobs too .Its not an issue.
    Actually what i meant "fine in all aspects" is that will the matrerialized view will get refreshed w.r.t the documetum_v table present in my remote server.This is all i need to refresh my materialized view .
    I queries the DBA_JOBS table .I could see the following result i have pasted below:-
    [\n]
    NLS_ENV
    MISC_ENV INSTANCE
    dbms_refresh.refresh('"WORKFLOW"."PRODUCTS_MV2"');
    JOB LOG_USER PRIV_USER
    SCHEMA_USER LAST_DATE LAST_SEC THIS_DATE THIS_SEC NEXT_DATE
    NEXT_SEC TOTAL_TIME B
    INTERVAL
    FAILURES
    WHAT
    [n]
    here WORKFLOW"."PRODUCTS_MV2 is the materialized view i have created.So can u tell me that whether we can predict our refresh part is functioning fine from this data.If so how?
    Actually i am asking u in details as i dont have much exposure to materialized view .I am using it for the very first time.
    Regds
    debashis

  • How to refresh materialized view by trigger

    hi,
    im having a problem in refreshing materialized view through a trigger.
    CREATE OR REPLACE TRIGGER L_TRG_MARC_TEST
    BEFORE DELETE OR INSERT OR UPDATE ON MARC_BOOK_B_ENG
    BEGIN
    DBMS_MVIEW.REFRESH('TITLE_ENG_MV','C','',TRUE,FALSE,0,0,0,TRUE);
    END;
    Trigger created.
    SQL> DELETE FROM MARC_BOOK_B_ENG;
    DELETE FROM MARC_BOOK_B_ENG
    ERROR at line 1:
    ORA-04092: cannot COMMIT in a trigger
    ORA-06512: at "SYS.DBMS_SNAPSHOT", line 849
    ORA-06512: at "SYS.DBMS_SNAPSHOT", line 832
    ORA-06512: at "LIBQAL1.L_TRG_MARC_TEST", line 2
    ORA-04088: error during execution of trigger 'LIBQAL1.L_TRG_MARC_TEST'
    plz tell me how to refresh materialized view thru trigger,,and what is wrong in above mentioned situation.
    Regards

    DBMS_MVIEW.REFRESH implicitly commits. COMMIT is not permitted in triggers, as you can see, unless you use AUTONOMOUS_TRANSACTION.
    Try
    CREATE OR REPLACE TRIGGER L_TRG_MARC_TEST
    BEFORE DELETE OR INSERT OR UPDATE ON MARC_BOOK_B_ENG
    DECLARE
    PRAGMA AUTONOMOUS_TRANSACTION;
    BEGIN
    DBMS_MVIEW.REFRESH('TITLE_ENG_MV','C','',TRUE,FALSE,0,0,0,TRUE);
    END;

  • Materialized view fast refresh

    I would like to create a fast refresh materialized view. The query is below.
    create materialized view dw_v_bal_txn_fast
    BUILD IMMEDIATE
    refresh fast
    as
    SELECT b.machine_id,nvl(p.promotion_code_id,0)promotion_code_id,p.promotion_code_name
    ,min(bal_transaction_id) bal_transaction_id
    ,offered_promotion_id
    ,operator_session_id
    ,decode((case when count(*)>1 then 1 else 0 end),1,max(transaction_type),0,max(transaction_type))transaction_type
    ,sum(balance_change) balance_change
    ,min(transaction_time) transaction_time
    ,min(dtransaction_time) dtransaction_time
    ,count(*)cnt
    ,count(balance_change)cnt_balance_change
    FROM balance_transaction b,promotion_code p
    WHERE
    b.machine_id=p.machine_id(+) and
    b.promo_code_id=p.promotion_code_id(+)
    and b.transaction_type in (3,5)
    GROUP BY b.machine_id
    ,p.promotion_code_id,p.promotion_code_name
    ,offered_promotion_id
    ,operator_session_id
    The materialized view logs are as follows:
    create materialized view log on pims_repo.balance_transaction WITH SEQUENCE, ROWID
    (machine_id,bal_transaction_id,MONEY_DEVICE_ID,offered_promotion_id,operator_session_id,transaction_type,
    balance_change,transaction_time,dtransaction_time,EXT_KEY,PROMO_CODE_ID,IMP_FILE_HISTORY_ID,PROMOTION_CODE,ACCOUNT_MASTER_ID,EZCODE_VALUE,
    PRIZECODE,PROMO_CODE_VALUE_ID
    INCLUDING NEW VALUES
    create materialized view log on pims_repo.promotion_code WITH SEQUENCE, ROWID
    (machine_id,promotion_code_id,CONFIGURATION_ID,PROMOTION_CODE_TYPE_ID,PROMOTION_CODE_NAME,PRICE,credit,PROMOTION_ID,
    ACTIVE_START_TIME,DACTIVE_START_TIME,ACTIVE_END_TIME,DACTIVE_END_TIME,AVAILABILITY,CREDIT_TYPE,TIME_MODIFIER,
    DAYS,START_TIME,DURATION,TRAFFIC_WATERMARK,TRAFFIC_PERIODS,TRAFFIC_PERIOD_LEN,TRAFFIC_MIN_TIME,TRAFFIC_MAX_TIME,DERIVED
    ,EXPIRED,uses,USES_ON_PURCHASE,SORT_KEY,FILTER_KEY,EXT_KEY,IMP_FILE_HISTORY_ID,LINKED_PROMOTION_CODE,MARGIN_CRITERIA,
    SELECTION_ODDS,AD_ONLY,REFILL_AMOUNT,FILLS
    INCLUDING NEW VALUES
    and the join columns (machine_id,promotion_code_id) of promotion_code has unique constraint in it.But it still says
    ORA-12015: cannot create a fast refresh materialized view from a complex query
    Can anyone please let me know what else needto be done.
    Thanks in advance.

    There are certain restriction on create meterialize view with Fast Refresh
    For example in your case,
    Restrictions on Fast Refresh on Materialized Views with Joins Only
    -They cannot have GROUP BY clauses or aggregates.
    -Rowids of all the tables in the FROM list must appear in the SELECT list of the query.
    -Materialized view logs must exist with rowids for all the base tables in the FROM list of the query.
    Full list of restrictions here
    http://download-west.oracle.com/docs/cd/B19306_01/server.102/b14223/basicmv.htm#i1006803

  • Sdo_cs.transform procedure in a materialized view

    Hi all,
    Oracle version :10.2.0.4
    I am trying to do perform reprojection in a materialised view ( refresh on demand, complete mode).
    It seems everytime I refresh the MV ,this error pops up.
    SQL> exec dbms_mview.refresh('SUPER', 'C');
    BEGIN dbms_mview.refresh('SUPER', 'C'); END;
    ERROR at line 1:
    ORA-12008: error in materialized view refresh path
    ORA-06531: Reference to uninitialized collection
    ORA-06512: at "SYS.DBMS_SNAPSHOT", line 2251
    ORA-06512: at "SYS.DBMS_SNAPSHOT", line 2457
    ORA-06512: at "SYS.DBMS_SNAPSHOT", line 2426
    ORA-06512: at line 1
    <code>
    CREATE MATERIALIZED VIEW "SUPER" ORGANIZATION HEAP PCTFREE 10 PCTUSED 40 INITRANS 1 MAXTRANS 255 NOCOMPRESS LOGGING STORAGE(INITIAL 65536 NEXT 1048576 MINEXTENTS 1 MAXEXTENTS 2147483645 PCTINCREASE 0 FREELISTS 1 FREELIST GROUPS 1 BUFFER_POOL DEFAULT) TABLESPACE "DATA_DATA" BUILD DEFERRED USING INDEX REFRESH COMPLETE ON DEMAND USING DEFAULT LOCAL ROLLBACK SEGMENT DISABLE QUERY REWRITE
    AS
    SELECT seq_nextval AS PID,
    SITE,
    STATE,
    reproject(geoloc)
    FROM BJON;
    <code>
    The procedure of reproject
    create or replace
    FUNCTION "REPROJECT" (p_coordinates in SDO_GEOMETRY)
         return SDO_GEOMETRY deterministic
         as v_coordinates SDO_GEOMETRY;
         BEGIN
              v_coordinates := sdo_cs.transform (p_coordinates, 4326);
              RETURN v_coordinates;
         end REPROJECT;
    Can anyone let me know hw I can put plug thereprojection in a materialized view.
    Edited by: CrackerJack on May 2, 2012 11:00 PM

    Hi all,
    Any clues?
    I have died of anymore ideas to make this work.
    All I need is a updated table with
    Primary key ,
    GEOMETRY 4326
    spatial index.
    metadata
    Teh materialized view is perfect except I can't do the reprojections.
    ORA-06531: Reference to uninitialized collection means have some null values in the array , but if you remove the Reproject function and just geometry itself , the materialised view works brilliant.
    I tried converting to 0,0 point in the function to tackle the nulls in array if any.. but doesn't work.
    sdo_cs.transform(nvl(geoloc, mdsys.sdo_geometry(2001, 8307, mdsys.sdo_point_type(0,0,NULL),NULL,NULL)),82027).get_wkt()
    Any ideas is much appreciated.
    Edited by: CrackerJack on May 6, 2012 10:27 PM

  • Materialized View to external dB

    I want to create a materialized view in 8.1.6 from an external dB (MS Access)using the Generic data access (Generic OTG), but cannot find documentation that tells me how to use the Generic OTG. The MS Access data can not be permanently brought into Oracle since it is part of another application, but is needed in Oracle for further analysis. Where is the documentation for the Generic OTG?

    Hi,
    Materialized views are schema objects that can be used to summarize, compute, replicate, and distribute data. They are suitable in various computing environments such as data warehousing, decision support, and distributed or mobile computing:
    In distributed environments, materialized views are used to replicate data at distributed sites and synchronize updates done at several sites with conflict resolution methods. The materialized views as replicas provide local access to data that otherwise has to be accessed from remote sites.
    Materialized views are similar to indexes in several ways:
    They consume storage space.
    They must be refreshed when the data in their master tables changes.
    They improve the performance of SQL execution when they are used for query rewrites.
    Their existence is transparent to SQL applications and users.
    Unlike indexes, materialized views can be accessed directly using a SELECT statement. Depending on the types of refresh that are required, they can also be accessed directly in an INSERT, UPDATE, or DELETE statement.
    A materialized view can be partitioned. You can define a materialized view on a partitioned table and one or more indexes on the materialized view
    A materialized view contains a complete or partial copy of a target master from a single point in time. The target master can be either a master table at a master site or a master materialized view at a materialized view site. A master materialized view is a materialized view that functions as a master for another materialized view. A multitier materialized view is one that is based on another materialized view, instead of on a master table.
    It requires lot of experience thats it.
    Regards
    vinod

  • Materialized view definition in oracle 9i

    How do we find the definiton (or the script) of a materialized view ? I am using oracle 9i and toad. The script tab of toad throws up the 'create table' script and not the original sql which defined the materialized view.
    Please help.

    You can use DBMS_METADATA :
    SCOTT@orcl SQL> create materialized view mv_emp
      2  refresh fast on demand with rowid
      3* as select empno,ename,job,sal from emp
    SCOTT@orcl SQL> /
    Materialized view created.
    SCOTT@orcl SQL> set long 100000
    SCOTT@orcl SQL> select DBMS_METADATA.GET_DDL('MATERIALIZED_VIEW','MV_EMP','SCOTT') from dual
    SCOTT@orcl SQL> /
    DBMS_METADATA.GET_DDL('MATERIALIZED_VIEW','MV_EMP','SCOTT')
      CREATE MATERIALIZED VIEW "SCOTT"."MV_EMP"
      ORGANIZATION HEAP PCTFREE 10 PCTUSED 40 INITRANS 1 MAXTRANS 255 NOCOMPRESS LOG
    GING
      STORAGE(INITIAL 65536 NEXT 1048576 MINEXTENTS 1 MAXEXTENTS 2147483645
      PCTINCREASE 0 FREELISTS 1 FREELIST GROUPS 1 BUFFER_POOL DEFAULT)
      TABLESPACE "USERS"
      BUILD IMMEDIATE
      USING INDEX PCTFREE 10 INITRANS 2 MAXTRANS 255
      STORAGE(INITIAL 65536 NEXT 1048576 MINEXTENTS 1 MAXEXTENTS 2147483645
      PCTINCREASE 0 FREELISTS 1 FREELIST GROUPS 1 BUFFER_POOL DEFAULT)
      TABLESPACE "USERS"
      REFRESH FAST ON DEMAND
      WITH ROWID USING DEFAULT LOCAL ROLLBACK SEGMENT
      DISABLE QUERY REWRITE
      AS select empno,ename,job,sal from emp
    SCOTT@orcl SQL>                                                                               

  • Materialized View Not Picked Up

    Hopefully I'm doing something wrong, because so far
    Materialized Views are useless. What's happening
    is that the MV is only picked up by a select
    statement when the select is identical to the MV
    query - this means that we'd have to create a
    separate MV for each possible query.
    Here's an example:
    create materialized view
    FACT_DIM04_LVL02
    enable query rewrite
    as
    select
    d04.DKEY
    , d04.LVL02_DESCR
    , f.KEY01
    , f.KEY03
    , f.YEAR_MONTH
    , f.SCENARIO
    , sum(f.AMOUNT) "AMOUNT"
    from FACT1 f
    , DIM04 d04
    where (f.KEY04 = d04.KEY04)
    and (f.ATTR01 = 'O')
    and (d04.LVL01_DESCR = '9999')
    and (f.SCENARIO IN ('ACT', 'PLAN'))
    group by
    d04.DKEY
    , d04.LVL02_DESCR
    , f.KEY01
    , f.KEY03
    , f.YEAR_MONTH
    , f.SCENARIO
    analyze table FACT_DIM04_LVL02 compute statistics ;
    So far so good. Now let's do an EXPLAIN using the exact
    same DDL used to create the MV:
    explain plan
    set STATEMENT_ID = 'FACT04'
    for
    select
    d04.DKEY
    , d04.LVL02_DESCR
    , f.KEY01
    , f.KEY03
    , f.YEAR_MONTH
    , f.SCENARIO
    , sum(f.AMOUNT) "AMOUNT"
    from FACT1 f
    , DIM04 d04
    where (f.KEY04 = d04.KEY04)
    and (f.ATTR01 = 'O')
    and (d04.LVL01_DESCR = '9999')
    and (f.SCENARIO IN ('ACT', 'PLAN'))
    group by
    d04.DKEY
    , d04.LVL02_DESCR
    , f.KEY01
    , f.KEY03
    , f.YEAR_MONTH
    , f.SCENARIO
    This gives:
    Query Plan
    SELECT STATEMENT Cost = 602
    TABLE ACCESS FULL FACT_DIM04_LVL02
    Great. However, now let's add one tiny little additional
    where clause to the query:
    explain plan
    set STATEMENT_ID = 'FACT04'
    for
    select /*+ REWRITE */
    d04.DKEY
    , d04.LVL02_DESCR
    , f.KEY01
    , f.KEY03
    , f.YEAR_MONTH
    , f.SCENARIO
    , sum(f.AMOUNT) "AMOUNT"
    from FACT1 f
    , DIM04 d04
    where (f.KEY04 = d04.KEY04)
    and (f.ATTR01 = 'O')
    and (d04.LVL01_DESCR = '9999')
    and (f.SCENARIO IN ('ACT', 'PLAN'))
    and (1 = 1)
    group by
    d04.DKEY
    , d04.LVL02_DESCR
    , f.KEY01
    , f.KEY03
    , f.YEAR_MONTH
    , f.SCENARIO
    Notice that I added the simplest predicate possible
    (1 = 1), AND I've added a hint telling the optimizer
    to use the new MV. However, Oracle does not recognize
    the MV; instead it goes back to the base tables:
    Query Plan
    SELECT STATEMENT Cost = 4130
    SORT GROUP BY
    HASH JOIN
    TABLE ACCESS BY INDEX ROWID DIM04
    INDEX RANGE SCAN DIM04_LVL02
    TABLE ACCESS FULL FACT_DIM04_LVL02
    In other words, this MV only seems to work if you're using
    the EXACT query that was used to create the MV, which
    makes it almost useless.
    I notice that in DBA_MVIEWS, there's a field called
    REWRITE_CAPABILITY, and this has a value of TEXTMATCH:
    SQLlist
    1 select mview_name, rewrite_enabled, rewrite_capability
    2* from dba_mviews
    SQL/
    MVIEW_NAME R REWRITE_C
    FACT_DIM04_LVL02 Y TEXTMATCH
    TEST01 Y GENERAL
    Here's what the manual says about this:
    TEXTMATCH: The defining query of the materialized view
    contained restrictions on the use of query rewrite.
    Yes, I'm using CBO and have set QUERY REWRITE to true.
    Also, should it matter, we're on 8.17, Sun Solaris 2.7
    Any ideas out there? TIA.

    What is the value of the job_queue_processes initialization parameter?
    Check dba|all|user_jobs to see if a refresh is actually scheduled and not marked broken.
    If a job is present, what is the value of the next_date column?

  • CREATE MATERIALIZED VIEW LOG ON / SNAPSHOT LOG ON

    HI,
    Is there any difference between create materialized view log on and creat snapshot on.
    Did some googling, found out that: A snapshot log is a table associated with
    the master table of a snapshot and Is used for refresh the master table\'s snapshots.
    Materialized view log is a table associated with the master table of a materialized view. Seem like the same.
    By the way, are these tables important? Will my database function as normal without these view log.
    regards,
    becks

    Where did you pick up this syntax from ?
    The MV Log that will be created on DOCUMENT will be called MLOG$_DOCUMENT.
    So, the correct syntax is :
    create materialized view log on DOCUMENT with primary key;this will create a "table" called MLOG$_DOCUMENT which serves as the Materialized View Log on the real table called DOCUMENT. This will allow you to create one or more Materialized Views based on DOCUMENT, which can be fast refreshed because of the presence of the MV Log. For example :
    create materialized view MV_DOCUMENT refresh fast on demand as select DOC_ID, DOC_DATE from DOCUMENT;(i.e. assuming you want an MV that has only two columns from the table DOCUMENT.
    Hemant K Chitale
    http://hemantoracledba.blogspot.com

  • Adding a field to materialized view

    I have a materialized view called DEVICE which gets it's data from a table called device in another database (asset3). A new field was added to the device table in the asset3 database. In order to add that field to the materialized view, will I need to drop the materialized view and recreate it or can I run an alter command to add the field?
    SQL> select MVIEW_NAME,QUERY from DBA_MVIEWS where OWNER='DWH' and MVIEW_NAME='DEVICE';
    MVIEW_NAME
    QUERY
    DEVICE
    select * from device@asset3Thanks
    Ravi

    You have to recreate materialized Views
    Example(REFRESH FAST ON COMMIT):
    SQL> CREATE MATERIALIZED VIEW LOG ON B with rowid;
    SQL> CREATE MATERIALIZED VIEW MV_B REFRESH FAST ON COMMIT with rowid AS select * from B;
    SQL> alter table B add k number;
    SQL> ALTER MATERIALIZED VIEW LOG ON B add (k);
    SQL> drop MATERIALIZED VIEW MV_B;
    SQ> CREATE MATERIALIZED VIEW MV_B REFRESH FAST ON COMMIT with rowid AS select * from B;Edited by: Surachart (HunterX) on Jun 17, 2009 11:11 PM

  • AWM does not provide Materialized Views as potential data sources.

    Hi
    I would like to map OLAP dimensions and cubes directly to materialized views. The Oracle AWM tool, however, only displays Tables, Views and Synonyms as mapping objects and I have to indirectly map to normal views created over the materialized views.
    Why does Oracle enforce this limitation?
    Thanks
    Kind Regards
    Greg

    Greg,
    Not sure why AWM enforces this limitation, certainly Warehouse Builder does not enforce this rule (at least not to my knowledge). You could raise a bug/enhancement request with Support. However, my recommendation is to never to map directly to a source object, such as a fact table or materialized view, in AWM. This can create all sorts of problems as you move your AWM model across environments. I always suggest to my customers and consultants they create a view over their source objects and use the view within the mapping editor. It will give you more control over the flow of data into your cube/dimension since it allows you to define filters on the view.
    Hope this helps
    Keith Laker
    Oracle EMEA Consulting
    BI Blog: http://oraclebi.blogspot.com/
    DM Blog: http://oracledmt.blogspot.com/
    BI on Oracle: http://www.oracle.com/bi/
    BI on OTN: http://www.oracle.com/technology/products/bi/
    BI Samples: http://www.oracle.com/technology/products/bi/samples/

  • Updating Materialized Views

    Hi,
    I am running a database on 10.2g version. I am new to Oracle Databases/SQL, so I need to know the possibility of updating the materialized views through a scheduler? Can I find any link where all the steps are described in order to update/refresh the materialized views (probably on a daily basis or on a weekly basis)? Any help would be appreciated.
    Thanks,
    Vipul

    Short answer: MVs can be refreshed automatically as specified at creation time (in this case this is handled internally by a DBMS_JOB job) or on demand: in this case you can try to use DBMS_SCHEDULER to create and schedule a job to call DBMS_MVIEW.REFRESH.
    Long answer: http://download.oracle.com/docs/cd/B19306_01/server.102/b14223/refresh.htm#sthref826

  • Summary Folders vs Materialized Views

    Hi everybody,
    Which is best to use summary folders/tables or materialized views? In other words , can materialized views replace the summary folders or vice versa?
    In which situations are we using materialized views and in which other situations are we using summary tables created by Discoverer..????
    Thanks , a lot
    Simon

    Hi ,
    I found at least one hindrance in creating a summary table from Discoverer Admin.
    Whereas , in SQL , i can write freely , for example....
    CREATE MATERIALIZED VIEW MV_DINAMIKOTITA_KLINON_TMHMA
    BUILD IMMEDIATE
    REFRESH START WITH TO_DATE(ADD_MONTHS(TRUNC(SYSDATE, 'RRRR'), 12) ,'DD/MM/RRRR')
    NEXT TRUNC(ADD_MONTHS(SYSDATE,12),'RRRR')
    AS
    SELECT TO_CHAR(SYSDATE,'RRRR') YEAR, CODE_TMHMATA , COUNT(BED) DINAMIKOTITA
    FROM BEDS
    GROUP BY TO_CHAR(SYSDATE,'RRRR') , CODE_TMHMATA
    where column 'BED' is of varchar2 datatype
    in Discoverer , the clause count(bed) is not produced when i select the table beds , as expected....because is of varchar2 datatype.
    When I add a custom item COUNT_BEDS which is a function count(beds) and trying to add it in the summary table an error message apperas:
    'That item have default aggregate of Detail and cannot be added to the summary....'.
    Having read the documetation and examples about summary tables , i found that at least one of the columns of the imported tables or views or mv's must be in number datatype , in order to be created as a summary table.....
    In my case this means that the column 'BED' should be of number datatype not varchar2...
    Are the above notes correct and how can i create the above displayed SQL statement as summary table...
    Thanks , a lot , anyway
    Simon

  • Materialized View not getting refreshed

    Oracle9i Enterprise Edition Release 9.2.0.1.0 - Production
    PL/SQL Release 9.2.0.1.0 - Production
    CORE 9.2.0.1.0 Production
    TNS for 32-bit Windows: Version 9.2.0.1.0 - Production
    NLSRTL Version 9.2.0.1.0 - Production
    I am having a situation here..there a materialized view named mv_empdept,the base table of this MV is located on a remote database.Therefore the MV creation scripti contains a DB link.
    Please find the script below.
    Select Deptno,dept_name,empno,ename,DOB,Job
    from [email protected];
    The refresh mode of this MV is set as FAST,and the refresh cycle is scheduled through Oracle Job.
    The job does get triggerd but from the log we found this error.
    The error message is:ORA-12008: error in materialized view refresh path
    ORA-01461: can bind a LONG value only for insert into a LONG column.
    I even checked at the source Db and found that there is no mismatch as far datatype and datalength is concerned.
    Strangely when i do a manual Complete refresh of the same MV the data does gets populated in mv_empdept snapshot.
    Can anybody explain me the why the data is not getting populated in FAST refresh mode.
    Your help is highly appreciated.
    ---Vineet

    Read the following...
    http://download.oracle.com/docs/cd/B10500_01/server.920/a96567/repmview.htm
    and analyze the restrictions of Fast Refresh in your situation.

Maybe you are looking for