Create materialized view in SE referring table in EE

Hi DBAs,
I am trying to create a Materialized view on Oracle 10g Standard Edition which is installed on Linux Debian Lenny.
The master table is on Oracle 10g Enterprise Edition installed on Red Hat Linux 4.1.2.
When I run,
create materialized view t1 build immediate refresh fast as (select * from aksharaemsmigrated.t1@db102)
i get,
ORA-12028: materialized view type is not supported by master site
When I run,
create materialized view t1 build immediate refresh fast on commit as (select * from aksharaemsmigrated.t1@db102);
I get,
ORA-01031: insufficient privileges
When I run,
select * from aksharaemsmigrated.t1@db102
I get,
the rows from aksharaemsmigrated.t1@db102
NOTE: 'db102' is remote DB on 10g EE for which I created db link.
I am able to create Mview for local table.
Is this not supported? I mean creating Mview on Oracle SE referring base table from Oracle EE.
I have to give solution soon. Can you please throw some light.
Regards,
Vijay

Don't put select statement inside parantheses.
Test these
create table x1 as select * from aksharaemsmigrated.t1@db102;
create materialized view t1 build immediate refresh fast as select * from aksharaemsmigrated.t1@db102 ;Note that you cannot create an MV that is REFRESH ON COMMIT when across Databases.
See my explanation at http://hemantoracledba.blogspot.com/2008/06/mvs-with-refresh-on-commit-cannot-be.html
Hemant K Chitale

Similar Messages

  • ORA-25175 when trying to create materialized view, organization index SOLV

    Hi,
    I'm trying to create a materialized view to compensate for non-normalized table.
    I have table anormal, and mv is to be on distinct agency, company in that table.
    Here goes:
    SQL> select * from v$version;
    BANNER
    Oracle Database 10g Enterprise Edition Release 10.2.0.3.0 - 64bi
    PL/SQL Release 10.2.0.3.0 - Production
    CORE    10.2.0.3.0      Production
    TNS for IBM/AIX RISC System/6000: Version 10.2.0.3.0 - Productio
    NLSRTL Version 10.2.0.3.0 - Production
    SQL> create table anormal (company varchar2(8) not null
      2                       ,dept varchar2(8) not null
      3                       ,agency varchar2(8) not null
      4                       ,constraint anormal_pk primary key (company,dept));
    Table created.
    SQL> insert into anormal values('c1', 1, 'Ajax');
    1 row created.
    SQL> insert into anormal values('c1', 2, 'Ajax');
    1 row created.
    SQL> insert into anormal values('c1', 3, 'Acme');
    1 row created.
    SQL> insert into anormal values('c2', 1, 'Acme');
    1 row created.
    SQL> insert into anormal values('c2', 2, 'Acme');
    1 row created.
    SQL> commit;
    Commit complete.
    SQL> select * from anormal;
    COMPANY  DEPT     AGENCY
    c1       1        Ajax
    c1       2        Ajax
    c1       3        Acme
    c2       1        Acme
    c2       2        Acme
    SQL> create materialized view agency_comp_mv
      2  organization index --primary key (agency, company)
      3  build deferred
      4  refresh on demand
      5  as
      6  select distinct agency, company from anormal
      7  /
    select distinct agency, company from anormal
    ERROR at line 6:
    ORA-25175: no PRIMARY KEY constraint found
    SQL>The error tells me that there is no primary key, but is there any way to add such?
    - or is my problem rather that I cannot use DISTINCT with organization index?
    Regards
    Peter
    bump
    Message was edited by:
    Peter Gjelstrup
    <SOLVED>
    Message was edited by:
    Peter Gjelstrup

    Thanks William,
    I tried with ON PREBUILT TABLE, just to see what happens.
    Building on my OP:
    SQL> create table iot(agency varchar2(8) not null, company varchar2(8) not null
      2                  ,constraint iot_pk primary key (agency,company))
      3  organization index;
    Table created.
    SQL> insert into iot select distinct agency, company from anormal;
    4 rows created.
    SQL> commit;
    Commit complete.
    SQL> create materialized view iot on prebuilt table
      2  as
      3  select distinct agency, company from anormal;
    Materialized view created.
    SQL> select * from iot;
    AGENCY   COMPANY
    Acme     c1
    Acme     c2
    Ajax     c1
    SQL> insert into anormal values('c3', 2, 'Foo');
    insert into anormal values('c3', 2, 'Foo')
    1 row created
    SQL> select * from anormal;
    COMPANY  DEPT     AGENCY
    c1       1        Ajax
    c1       2        Ajax
    c1       3        Acme
    c2       1        Acme
    c2       2        Acme
    c3       2        Foo
    6 rows selected.
    SQL> select * from iot;
    AGENCY   COMPANY
    Acme     c1
    Acme     c2
    Ajax     c1
    3 rows selectedNow, try to refresh and MV
    SQL> alter materialized view iot refresh complete;
    Materialized view altered.
    SQL> select object_type, to_char(last_ddl_time, 'hh:mi:ss'), status
      2    from user_objects where object_name = 'IOT';
    OBJECT_TYPE         DDL_TIME STATUS
    TABLE               10:40:42 VALID
    MATERIALIZED VIEW   10:41:13 VALID
    SQL> select * from iot;
    AGENCY   COMPANY
    Acme     c1
    Acme     c2
    Ajax     c1Agency "Foo" is not in MV,
    Looks like that IOT select'ed from is indeed the MV:
    SQL> drop table iot;
    drop table iot
    ERROR at line 1:
    ORA-12083: must use DROP MATERIALIZED VIEW to drop "STIK"."IOT"
    SQL>So, seems that Maxim is right, it just can't be done. And it seems my options are:
    Create HEAP organized MV or
    Create and maintain IOT
    Regards
    Peter

  • CREATE MATERIALIZED VIEW - TABLE OR VIEW DOES NOT EXIST

    Anybody can help me? Why could this happen?
    SQL> CREATE MATERIALIZED VIEW LESTARI.YIELD_BI_ACTUAL_PLAN_BLOK_MVU
    2 TABLESPACE MVU
    3 NOCACHE
    4 NOPARALLEL
    5 REFRESH FORCE
    6 START WITH TO_DATE('19-APR-2005 18:00:00','DD-MON-YYYY HH24:MI:SS')
    7 WITH PRIMARY KEY
    8 USING DEFAULT LOCAL ROLLBACK SEGMENT
    9 DISABLE QUERY REWRITE AS
    10 SELECT PT,
    11 TO_CHAR(TANGGAL,'MMYYYY')PERIODE,
    12 AFDELING,
    13 BLOK,
    14 TH_TANAM,
    15 SUM(TON_TERIMA) TON_TERIMA,
    16 SUM(JJG_TERIMA) JJG_TERIMA,
    17 SUM(JJG_PANEN) JJG_PANEN,
    18 SUM(HK) HK, (LS_TANAM),
    19 DECODE(LS_TANAM,0,0,ROUND((SUM(TON_TERIMA)/(LS_TANAM)),2)) YIELD,
    20 HITUNG_STANDARD_YIELD (PT, TH_TANAM,TO_CHAR(TANGGAL,'MMYYYY')) YIELD_STD,
    21 DECODE(SUM(JJG_TERIMA),0,0,ROUND(SUM(TON_TERIMA)*1000/SUM(JJG_TERIMA),2)) BJR,
    22 HITUNG_STANDARD_BJR_TH_TANAM(PT,TH_TANAM) BJR_STD,
    23 DECODE(SUM(HK),0,0,ROUND((SUM(TON_TERIMA)*1000/SUM(HK)),2)) OP,
    24 DECODE(SUM(JJG_TERIMA),0,0,HITUNG_STANDARD_OUTPUT_PEMANEN(ROUND(SUM(TON_TERIMA)*1000/SUM(JJG_
    TERIMA),2))) OP_STD,
    25 MAX(POTENSI) POTENSI,
    26 MAX(DIS_POT) DIS_POT,
    27 DECODE(LS_TANAM,0,0,ROUND(MAX(POTENSI)*MAX(DIS_POT)/100/LS_TANAM,2)) YIELD_POTENSI,
    28 MAX(RAPIM) RAPIM,
    29 MAX(DIS_RAPIM) DIS_RAPIM,
    30 DECODE(LS_TANAM,0,0,ROUND(MAX(RAPIM)*MAX(DIS_RAPIM)/100/LS_TANAM,2)) YIELD_RAPIM
    31 FROM (SELECT B.*, A.LS_TANAM, A.TH_TANAM, POTENSI, DIS_POT, RAPIM, DIS_RAPIM
    32 FROM ASSET_BLOK_VU A, T_TANAMAN B, T_PLAN_TANAMAN C, T_DISTRIBUSI_PLAN_TANAMAN D
    33 WHERE A.PT = B.PT
    34 AND B.PT = C.PT
    35 AND C.PT = D.PT
    36 AND A.KD_AFD = B.AFDELING
    37 AND B.AFDELING = C.AFDELING
    38 AND A.KD_BLOK = B.BLOK
    39 AND B.BLOK = C.BLOK
    40 AND A.TAHUN = TO_CHAR(TANGGAL,'RRRR')
    41 AND TO_CHAR(TANGGAL,'MM')=D.BULAN
    42 AND A.TAHUN = D.TAHUN
    43 AND A.TAHUN = C.TAHUN
    44 AND A.LS_TANAM > 0) A
    45 GROUP BY PT, TO_CHAR(TANGGAL,'MMYYYY'), AFDELING, BLOK, LS_TANAM, TH_TANAM
    46 /
    CREATE MATERIALIZED VIEW LESTARI.YIELD_BI_ACTUAL_PLAN_BLOK_MVU
    ERROR AT LINE 1:
    ORA-00942: TABLE OR VIEW DOES NOT EXIST

    32 FROM ASSET_BLOK_VU A, T_TANAMAN B, T_PLAN_TANAMAN C, T_DISTRIBUSI_PLAN_TANAMAN D
    Either of these tables/views do not exist. Check the spelling of the table/view names

  • Create materialized View fails with "table or view does not exist"

    DB: 10.2.0.4
    OS: Win 2003
    Hi,
    Here in my tests, i have 2 databases (A(source) and B(backup)), and i am trying to create an mview in database B to replicate data from one test table from database A, only for test purpose. I'm getting the error "table or view does not exist" when i try to create a mview with REFRESH FAST. Here is my code:
    CREATE MATERIALIZED VIEW TESTES.TAB_TESTES_REPLIC_MVIEW_02
    REFRESH FAST
    START WITH TO_DATE('21/02/2012 18:50:00', 'DD/MM/YYYY HH24:MI:SS')
    NEXT SYSDATE + 1/24/60
    WITH PRIMARY KEY
    AS SELECT REGISTRO1,
    REGISTRO2
    FROM TESTES.TAB_TESTES_REPLIC_MVIEW_02@DB_LINK_ORA10;
    The dblink is workig fine(dblink user has select privilege on TESTES.TAB_TESTES_REPLIC_MVIEW_02), and i have created the mview log on database A.
    Where is my mistake.
    Thanks a lot.
    Edited by: Fabricio_Jorge on 21/02/2012 19:06

    I found the solution.
    I had to grant SELECT on the mview log. The name is avaiable in DBA_MVIEW_LOGS

  • Create Materialized View  based on another database table using db link?

    SQL> SELECT sysdate
    2 FROM dual@CBRLINK ;
    SYSDATE
    21-NOV-12
    SQL> CREATE MATERIALIZED VIEW USERCBR.V_T24_COUNTRY1
    2 REFRESH COMPLETE
    3 START WITH SYSDATE NEXT SYSDATE + (5/24)
    4 AS
    5 SELECT sysdate
    6 FROM dual@CBRLINK ;
    CREATE MATERIALIZED VIEW USERCBR.V_T24_COUNTRY1
    ERROR at line 1:
    ORA-04052: error occurred when looking up remote object SYS.DUAL@CBRLINK
    ORA-00600: internal error code, arguments: [ORA-00600: internal error code,
    arguments: [qksfroFXTStatsLoc() - unknown KQFOPT type!], [0], [], [], [], [],
    ORA-02063: preceding line from CBRLINK

    It works for me:orcl>
    orcl> CREATE MATERIALIZED VIEW scott.V_T24_COUNTRY1
      2  REFRESH COMPLETE
      3  START WITH SYSDATE NEXT SYSDATE + (5/24)
      4  AS
      5  SELECT sysdate
      6  FROM dual@l1 ;
    Materialized view created.
    orcl> select * from v$version;
    BANNER
    Oracle Database 11g Enterprise Edition Release 11.2.0.3.0 - Production
    PL/SQL Release 11.2.0.3.0 - Production
    CORE    11.2.0.3.0      Production
    TNS for 32-bit Windows: Version 11.2.0.3.0 - Production
    NLSRTL Version 11.2.0.3.0 - Production
    orcl>so there is no problem with the code. HTH.

  • Creating Materialized View in Toad

    As with every new endeavor - come new questions.
    I am trying to create a materialized view via toad (first time doing this). Now - toad is great, since it provides a kind-of wizard interface. Hence, one doesn't have to completely code in the create statement, with all of the options, etc.
    Instead, in toad, one can (via the schema browser), go into the Materialized Views tab and click on create new. This opens a window with 6 tabs: Basic Info, Refresh Info, Physical Attributes, Query, Partitions & Subpartition Template.
    In the Basic Info, one can put a check mark next to some of the following options:
    -Build Deffered
    -Parallel
    -Cache
    -Logging
    -Using index
    -Allow updates
    etc.
    I have read that build deferred refers to whether or not you would like the view to be created automatically or to be deferred.
    Anyways, I tried to find Toad documentation to explain each of the options in-detail. No success. Hence, am researching each part piece by piece.
    But - here is my question:
    In the Query tab, we are asked to specify a query. I am assuming that the query does not have to be a full query, beginning with CREATE MATERIALIZED VIEW mv_table1 REFRESH FAST etc...
    Since in this 'wizard', we are providing the MV name at the top of the dialog box, we are checking the 'options' in the other tabs, etc.
    And so, I assumed that the query should merely be a select query in the window mentioned above.
    So I entered the following:
    select * from table1@remote_db;
    When I go to verify the syntax, I get the error message: ORA_00911: invalid character. It seems to be pointing to my db_link (remote_db). I have been using this link throughout many places, w/o any problems.
    Has anyone created a MV in toad before? Any links to good toad documentation would be helpful as well.
    Thanks.

    (This is fun... ;))
    For anyone endeavoring this in the future, below I have attached the prerequisites required in order to create a materialized view (can also be found @ http://download-uk.oracle.com/docs/cd/B14117_01/server.101/b10759/statements_6002.htm):
    Prerequisites
    The privileges required to create a materialized view should be granted directly rather than through a role.
    To create a materialized view in your own schema:
    You must have been granted the CREATE MATERIALIZED VIEW system privilege and either the CREATE TABLE or CREATE ANY TABLE system privilege.
    You must also have access to any master tables of the materialized view that you do not own, either through a SELECT object privilege on each of the tables or through the SELECT ANY TABLE system privilege.
    To create a materialized view in another user's schema:
    You must have the CREATE ANY MATERIALIZED VIEW system privilege.
    The owner of the materialized view must have the CREATE TABLE system privilege. The owner must also have access to any master tables of the materialized view that the schema owner does not own (for example, if the master tables are on a remote database) and to any materialized view logs defined on those master tables, either through a SELECT object privilege on each of the tables or through the SELECT ANY TABLE system privilege.
    To create a refresh-on-commit materialized view (ON COMMIT REFRESH clause), in addition to the preceding privileges, you must have the ON COMMIT REFRESH object privilege on any master tables that you do not own or you must have the ON COMMIT REFRESH system privilege.
    To create the materialized view with query rewrite enabled, in addition to the preceding privileges:
    If the schema owner does not own the master tables, then the schema owner must have the GLOBAL QUERY REWRITE privilege or the QUERY REWRITE object privilege on each table outside the schema.
    If you are defining the materialized view on a prebuilt container (ON PREBUILT TABLE clause), then you must have the SELECT privilege WITH GRANT OPTION on the container table.
    The user whose schema contains the materialized view must have sufficient quota in the target tablespace to store the master table and index of the materialized view or must have the UNLIMITED TABLESPACE system privilege.
    When you create a materialized view, Oracle Database creates one internal table and at least one index, and may create one view, all in the schema of the materialized view. Oracle Database uses these objects to maintain the materialized view data. You must have the privileges necessary to create these objects.

  • Error while creating materialized view which using database link

    Helo!
    I'm getting error "ORA-00942: table or view does not exist" when I want to create materialized view.
    Details:
    1. On destination database I create a database link:
    CREATE DATABASE LINK SDATABASE
    CONNECT TO MYUSER
    IDENTIFIED BY MYUSERPASS
    USING 'ORCL';
    => Command "SELECT * FROM TABLE1@SDATABASE" returns data normally!
    2. On source database I create MATERIALIZED VIEW LOG:
    CREATE MATERIALIZED VIEW LOG
    ON TABLE1
    WITH PRIMARY KEY
    INCLUDING NEW VALUES;
    3. Now, when I want to create MATERIALIZED VIEW on destination database:
    CREATE MATERIALIZED VIEW TABLE1
    REFRESH FAST
    START WITH SYSDATE
    NEXT SYSDATE + 1/1440
    WITH PRIMARY KEY
    AS SELECT * FROM TABLE1@SDATABASE;
    ...I get error "ORA-00942: table or view does not exist"!
    How is that possible if command "SELECT * FROM TABLE1@SDATABASE" returns data normally?
    Thanks,
    Voranc

    And, I'm using Oracle 10g.
    Voranc

  • How to create materialized view based on a view?

    Hi,
    I hope this is not very far fetched idea.
    I have a very complex view and I would like to replicate it 'in place' that is I would like to make a materialized view that is based on this view complex view. I would like to use this materialized view (i.e table) to query data instead of using the original view, since it takes Oracle some 10-15 seconds to execute my query on the original view and I am not allowed to create indexes on most of the tables that are included in the original view.
    Can this be done?
    Best regards,
    Tamas Szecsy

    The best way to do this is to create a materialzed view based on the underlying code of the original view. If you don't have this handy, issue the following in sqlplus:
    select text
    from user_views
    where view_name = 'NAME_OF_VIEW'
    You can then cut and paste the sql statement into your create materialized view statement.
    Please note, you will probable have to set the long parameter to a higher value to reveal the complete statement for example:
    SQL> set long 2048

  • How to create materialized view based on a synonym

    Hi all,
    I am trying to create simple materialized view based on a synonym and that synonym is pointing a view in other database (using dblink). I am getting table or view not found error . I am able to select synonym if i use select but not in materialized view. Please help me.
    Thanks,

    The best way to do this is to create a materialzed view based on the underlying code of the original view. If you don't have this handy, issue the following in sqlplus:
    select text
    from user_views
    where view_name = 'NAME_OF_VIEW'
    You can then cut and paste the sql statement into your create materialized view statement.
    Please note, you will probable have to set the long parameter to a higher value to reveal the complete statement for example:
    SQL> set long 2048

  • How to CREATE MATERIALIZED VIEW LOG (MV fast refresh) with some JOINS

    Hi @ all,
    i'm trying to create a MATERIALIZED VIEW LOG for a fast refresh of a MATERIALIZED VIEW.
    It works fine with a simple Request in the MATERIALIZED VIEW:
    CREATE MATERIALIZED VIEW MV_ZOTD43_P
    TABLESPACE GDII
    BUILD IMMEDIATE
    REFRESH FORCE AS
    SELECT * FROM ZOTD43_P;
    COMMIT;
    CREATE MATERIALIZED VIEW LOG ON ZOTD43_P
    TABLESPACE "GDII"
    WITH PRIMARY KEY, ROWID, SEQUENCE INCLUDING NEW VALUES;
    call DBMS_MVIEW.REFRESH('MV_ZOTD43_P', 'f');
    But when I use a complex SQL-Request with some JOINS (one of the Table with spatial Data) in the MATERIALIZED VIEW, I get an error:
    CREATE MATERIALIZED VIEW MV_TEST
    TABLESPACE GDII
    BUILD IMMEDIATE
    REFRESH FORCE AS
    SELECT lptd04_p.sst_nr AS sst_nr,
    lptd03_p.aaaa AS aaaa,
    lptd04_geom.geom as geom
    FROM lptd04_p lptd04_p
    JOIN lptd01_p lptd01_p ON lptd01_p.cre_nr = lptd04_p.sst_nr
    JOIN lptd04_geom ON lptd04_geom.sst_nr = lptd04_p.sst_nr
    JOIN lptd03_p lptd03_p ON lptd03_p.lief_nr = lptd04_p.lief_nr;
    COMMIT;
    CREATE MATERIALIZED VIEW LOG ON LPTD04_P
    TABLESPACE "GDII"
    WITH PRIMARY KEY, ROWID, SEQUENCE INCLUDING NEW VALUES;
    call DBMS_MVIEW.REFRESH('MV_TEST', 'f');
    Error report:
    SQL Error: ORA-12004: REFRESH FAST kann für Materialized View "GDI"."MV_GDI_SST_STAMM" nicht benutzt werden
    ORA-06512: in "SYS.DBMS_SNAPSHOT", Zeile 2255
    ORA-06512: in "SYS.DBMS_SNAPSHOT", Zeile 2461
    ORA-06512: in "SYS.DBMS_SNAPSHOT", Zeile 2430
    ORA-06512: in Zeile 1
    12004. 00000 - "REFRESH FAST cannot be used for materialized view \"%s\".\"%s\""
    *Cause:    The materialized view log does not exist or cannot be used. PCT
    refresh is also not enabled on the materialized view
    *Action:   Use just REFRESH, which will reinstantiate the entire table.
    If a materialized view log exists and the form of the materialized
    view allows the use of a materialized view log or PCT refresh is
    possible after a given set of changes, REFRESH FAST will
    be available starting the next time the materialized view is
    refreshed.
    Am I doing something wrong or is it not possible CREATE MATERIALIZED VIEW LOG when the MATERIALIZED VIEW got some JOINS?
    Regards,
    Greq

    Thanks for the link Alessandro ,
    the error seems something to do with the Column-Type SDO_GEOMETRY, so
    i create a new thread in the Spatial Discussion forum:
    FAST REFRESHing of Oracle Materialized Views containing SDO_GEOMETRY column
    Regards,
    Greq

  • Error while creating Materialized View step 3 of 6 using wizard

    have oracle 9i Rel 1 on Windows 2000 server. Master Site has been setup. Database links are created at Materialized view site. But while creating Materialized View Group using wizard there is following error on step 3 of 6.
    Statement:----------------
    /*OracleOEM*/ SELECT 1 FROM SYS.dba_constraints@masterdbname WHERE OWNER='username' and table_name='tabname' AND constraint_type='P'
    Stack Trace:----------------
    ORA-00942: table or view does not exist.
    ORA-02063: preceding line from masterdbname.
    All parameters for replication are correct.
    Please help me early.
    Thanks

    Hello,
    In the masterdbname, logging as sys user, you must grant select permission on sys.dba_constraints view to mvadmin_dbname user (where dbname is the replicated database name).
    Regards,

  • Error while creating Materialized View step 3 of 6

    I have oracle 9i Rel 1 on Windows 2000 server. Master Site has been setup. Database links are created at Materialized view site. But while creating Materialized View Group there is following error on step 3 of 6.
    Statement:----------------
    /*OracleOEM*/ SELECT 1 FROM SYS.dba_constraints@masterdbname WHERE OWNER='username' and table_name='tabname' AND constraint_type='P'
    Stack Trace:----------------
    ORA-00942: table or view does not exist.
    ORA-02063: preceding line from masterdbname.
    All parameters for replication are correct.
    Please help me early.
    Thanks

    Hello,
    In the masterdbname, logging as sys user, you must grant select permission on sys.dba_constraints view to mvadmin_dbname user (where dbname is the replicated database name).
    Regards,

  • Error on creating Materialized view.

    Hi,
    I don't understand why it happens...
    When I tried to creating materialized view, it shows a error "ORA-01013: User requested cancel of current operation".
    I don't understand why it happens. I just waited it successfully created. But I didn't press any button.
    Does it matter of size of joining table? I had same issue before. At that time I just removed some tables from the joining condition, this error was gone.
    But at this time, I cannot exclude any other tables the select statement
    Can anyone help me this issue, please?

    Hi,
    11g ( 11.2.0.3 ) has a problem with materialized views based on ROWID, resulting in the problem you mentioned.
    A workaround is creating the MV's based on primary keyl.
    There is also a patch available on MOS, to solve the problem ( thanks to a very long SR from me :-) )
    It is known as bug 13657605 and the patch for it has the same number.
    Remember to read the README, as this patch is only for 11.2.0.3 !!
    Cheers
    FJFranken

  • Problems in creating Materialized View from 10g R2  to 11g

    Hi,
    We have two databases in 10g Release 2. These databases are on two different servers and we use
    Materialized views to replicate data between these servers. We are currently using 64 bit version of
    oracle 10g release 2 for LINUX.
    Oracle Database 10g Release 10.2.0.1.0 - 64 bit Production
    PL/SQL Release 10.2.0.1.0 - Production
    CORE 10.2.0.1.0 Production
    TNS for Linux: Version 10.2.0.1.0 - Production
    NLSRTL Version 10.2.0.1.0 - Production
    We use CENTOS 5 - 64 bit edition
    We upgraded one of the databases to 11g (We exported the data from old database and
    imported it in new database) . Then we tried to create a Materialized view with incremental refresh
    on it where the base table is in the second Oracle 10g database.
    The problem is that it is not letting us create the view with FAST Refresh. It kept on giving ORA-12028
    error. We tried different remedies suggested on forums like creating a view with ROWID, but still it
    continued giving us the same error. We also synchronized the characterset of Oracle 10g and Oracle 11g
    installations but still it did not work.
    Our base table size is pretty large (over 10 Million records) and if we do a full refresh, it takes hours to
    refresh it.
    Without incremental refresh, we will not be able to fucntion, and to upgrade both database simultaneously
    we will need a large down-time which also we can not afford.
    Please advise what should we do.
    Best Regards
    Madhup
    Edited by: Madhup on Mar 2, 2009 10:45 AM

    Hello,
    Yesterday I met the same problem and very sad about this, however, my story is much more complicated (I think so).
    I have 6 databases:
    2 - 11g
    2 - 10g
    2 - 9i
    Every database of each release has different characterset(UTF8 and AL16UTF16).
    I am trying to create Materialized view with FAST REFRESH on Oracle 11g, when master tables are located on 10g database and 9i database.
    Materialized view, which points to 9i database, was successfully created.
    Materialized view, which points to 10g database, gets ORA-12028
    Like you, I tried many notes from METALINK and thought at the begining that the problem is my characterset. But, when the materialized views were successfully built on Oracle 9i database, I understood that the problem is something else.
    Did you find the actual reason why this issue does not work??
    Thanks,
    Alex

  • Create Materialized View with GROUP BY

    I have a table
    treecluster NUMBER(3)
    treenumber NUMBER(3)
    treedate DATE
    nestnumber NUMBER(3)
    eggs NUMBER(3)
    nestlings NUMBER(3)
    fledglings NUMBER(3)
    nestfate VARCHAR2(10)
    nestfailurecode NUMBER(2)
    I want to group the data by treecluster, treenumber, year, and nest number and get a max eggs, nestlings, fledglings. I am doing this with the following:
    SELECT treecluster, treenumber, to_char(nestchecksdate, 'YYYY'), nestnumber,
    max(eggs), max(nestlings), max(fledglings)
    FROM nestchecks
    GROUP BY treecluster, treenumber, to_char(nestchecksdate, 'YYYY'), nestnumber;
    This works fine.
    The last record for a year has a nestfate and nestfailurecode value.
    I need to group all information and then also get the nestfate and nestfailurecode for the year. How do I go about getting this information?
    I am really trying to create a summary materialized view based on a data table so the select I am trying to craft would be a part of a create materialized view as SELECT...
    so I want to be able to group the info and add in the nestfate and failurecode in one step.
    Thanks!

    try this:
    SQL> select * from table_tree;
    TREECLUSTER TREENUMBER NESTCHECK NESTNUMBER       EGGS  NESTLINGS FLEDGLINGS NESTFATE   NESTFAILURECODE
              4        167 17-MAY-00          2          0          0
              4        167 24-MAY-00          2          3          0
              4        167 30-MAY-00          2          3          0
              4        167 12-JUN-00          2          0          1            FAILURE                  2
    select a.treecluster, a.treenumber, to_char(a.nestyear,'YYYY') nestyear,
           a.nestnumber, a.eggs, a.nestlings, a.fledglings, a.nestfate, a.nestfailurecode
    from   (select max(treecluster) treecluster, max(treenumber) treenumber,
                   max(nestchecksdate) nestyear,
                   max(nestnumber) nestnumber, max(eggs) eggs, max(nestlings) nestlings,
                   nvl(max(FLEDGLINGS),0) FLEDGLINGS, max(NESTFATE) NESTFATE,
                   max(nestfailurecode) nestfailurecode
            from table_tree) a
    TREECLUSTER TREENUMBER NEST NESTNUMBER       EGGS  NESTLINGS FLEDGLINGS NESTFATE   NESTFAILURECODE
              4        167 2000          2          3          1          0 FAILURE                  2hope this helps

Maybe you are looking for

  • Video Download Error

    When I try to download a video my iTunes comes up with the error: "There was an error downloading your purchased music. The disk could not be read from or written to." However, when I download music it works fine. I have no idea as to why I am gettin

  • Scrubs Season 6 updates?

    I've generally been impressed with itunes speed and reliability in making television shows available to viewers only a day or so after they originally air. I bought the season pass for Scrubs because I'm often away Thursday nights. This has been the

  • Table Field Names

    Hi All, I m unable to find tables, in which these fields are related..mainly....Father's Name and Shift.... Plz Help Me... Thanks...

  • Fixing unstable performance on macbook pro

    Hi team, I have a macbook pro bought nov 2011 It has run fine but recently I have been using it constantly for my new job running Adobe software like Flash, premiere pro and after effects (mainly flash) cs5.5 intel i7 2.4ghtz quad core with 8Gb ram,

  • Uploading my dynamic site to Netfirms MySQL

    I created a dynamic site in CS5.5, using XAMPP to make it locally. After putting it on my Netfirms-hosted remote server, I get an error saying: Warning: mysql_pconnect() [function.mysql-pconnect]: Can't connect to local MySQL server through socket '/