ORA-12083: must use DROP MATERIALIZED VIEW to drop

Hi all

Oracle 10 g 2
Solaris 10

face below question... can't go below the user because of the MV... Please let me know how to delete user and MV...
SQL > drop user cascade DW_USR;
*
ERROR on line 1:
ORA-00604: an error has occurred at the SQL level 1 recursive
ORA-12083: must use DROP MATERIALIZED VIEW to drop
'DW_USR '. "" Dept_account_MV_M ".

I tried as you said... .but no luck.
.. is this a bug?

I hope that's not a bug...

I hope.. materialized view appears to be abandoned by the drop command but recreation fails because of some disctionary sys tables. the origin of the problem... it's suspicious only...

check once... otherwise connect you SR with metalink...

Tags: Database

Similar Questions

  • ORA-24005: must use DBMS_AQADM. DROP_QUEUE_TABLE to drop queue tables

    When I drop the simple control panel drop I get this error.


    ORA-24005: must use DBMS_AQADM. DROP_QUEUE_TABLE to drop queue tables

    solution

    This error come when you deposit QUEUE_TABLE with normal drop table command.

    To remove the queue table, you should use DBMS_AQADM. DROP_QUEUE_TABLE procedure.

    BEGIN
    DBMS_AQADM. DROP_QUEUE_TABLE ("the queue table name", TRUE);
    END;
    /

  • Issue of DB: error ORA-00333 & ORA-01589: must use RESETLOGS or NORESETLOGS

    Hello

    I have question DB Oracle 9.2.0.6.0 all start-up:

    DB mount OK,

    SQL > alter database open;
    change the database open
    *
    ERROR on line 1:
    ORA-00333: make the mistake of reading newspaper block 106498 County 8192


    then I tried some recovery as below, but always error:
    =================================
    SQL > recover database until cancel;
    ORA-00279: change 9228925192024 September at 2010-12-29 15:20:48 needed to screw 1
    ORA-00289: suggestion: /ora/datafile/archive/1_250.dbf
    ORA-00280: change 9228925192024 thread 1 is in sequence #250


    Specify the log: {< RET > = suggested |} Filename | AUTO | CANCEL}

    ORA-00308: cannot open archived log ' / ora/datafile//archive/1_250.dbf'
    ORA-27037: unable to get file status
    Linux error: 2: no such file or directory
    Additional information: 3


    ORA-01547: WARNING: RECOVER succeeded but OPEN RESETLOGS would get below error
    ORA-01194: file 1 needs a recovery more match
    ORA-01110: data file 1: ' / ora/datafile/system01.dbf'

    ----------------------------------------

    SQL > alter database open resetlogs;
    ALTER database open resetlogs
    *
    ERROR on line 1:
    ORA-01194: file 1 needs a recovery more match
    ORA-01110: data file 1: ' / ora/datafile/system01.dbf'

    ----------------------------------------

    SQL > alter database open;
    change the database open
    *
    ERROR on line 1:
    ORA-01589: must use RESETLOGS or NORESETLOGS option of database open
    ====================================================

    Please guide to do this,

    Thank you and best regards,
    Vishnu

    If the Redo Log file CURRENT (status in V$ LOG or reading the alert.log indicating that the switch in this journal of recovery has been done) is corrupt, the only recourse is to RESTORE the database from a previous backup and then BACK up to the previous to redo log / ArchivedLog.

    See the documentation on the various scenarios:

    http://download.Oracle.com/docs/CD/B19306_01/backup.102/b14191/recoscen.htm#CACFFJFB

    Hemant K Collette

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

    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 it's all good. Now, if I create the log of the materialized with the possibility of COMMETTRE SNA view:
    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>
    Commit an update that updates no line against a main table for a single table quickly updatable materialized view results in the error above when the log of the materialized on the main table view is created with the option of COMMETTRE YVERT. I'm guessing that's not how things are supposed to work. Or am I missing something here? Someone else has encountered this before?

    See you soon.

    Published by: task on 25 January 2013 13:27

    Hi, detaching,

    Looks like that Bug ID 13910043

    Concerning
    Peter

  • ORA-12008: error path refresh materialized view

    Hello world

    I get a weird error when I try to do a quick refresh on my materialized view. My basic approach is simple, that I had a newspaper of MV on my fact table with all the columns required by the materialized view, sequence, including NEW rowid VALUES.

    I have my setup of materialized with a view my summary level, COUNT (*) and COUNT (EXP) for every SUM (EXP). I check the MV_CAPABILITIES_TABLE, and of course, it can be run with fast refresh. I have my fact table in the schema USER1 and my materialized in USER2 schema view.

    When I create the materialized view, there is no problem. If I immediately executes a fast refresh (EXEC DBMS_MVIEW. REFRESH ('MY_MV', 'F'); ), once again, no problem.

    However, if I run the ETLs that update the source fact table, and then I run the quick update again, I get ORA-120008.

    But if I do the exact same MV in the scheme of the User1, I have no problem making quick refreshes. What is happening with this? Is the owner of the table must be the one with the materialized view? User1 and USER2 are on the same PB and have the same table space. Should User2 also select additional subsidies on the source fact table? What I give to select on the MVIEW connect you somehow?

    Thanks for the help!

    -Joe

    The mview journal is a separate table. You must grant select, insert, update, delete on it to the user mview.

  • Do not to use the materialized view

    I wonder if we've already created a materialized view, can we prefer not to use this point of view, materialized for a query? I want to say can we determine if a query uses MV and other queries don't use MV?  Thank you.

    Hello Indra,

    I'm not completely sure about that, but you can read (with examples) concerning the indications- NO_REWRITE and REWRITE

    Text over the doc links:

    Council of REWRITING:

    The REWRITE Council instructs the optimizer to rewrite a query regarding the materialized views when possible, regardless of cost. Use the REWRITE trick with or without a display list. If you use REWRITE with a view list and the list contains an eligible materialized view, then Oracle uses this view regardless of its cost.

    Tip NO_REWRITE:

    The NO_REWRITE Council tells the optimizer to disable the rewrite of the query to the query block, of the substitution of the definition of the parameter QUERY_REWRITE_ENABLED .

    Be aware! -The NOREWRITE suspicion has been deprecated. Use the NO_REWRITE hint instead.

    Read here: setting QUERY_REWRITE_ENABLED

    -Nordine

  • use of materialized views?

    can someone tell me the use of materilized views in oracle?
    briefly explain it please...

    Are you clear now? Those who helped you...?
    If this isn't the case, you can still ask your doubts until you release.

    Vanessa B.

  • Replication of data between SQL Server and using Oracle11g materialized view.

    I have Sqlserver 2005 as my source and oracle11g as my target. I need fill out the target daily with change of the source data.
    to do this, we created a dblink between SQL Server and oracle and reproduced this table as a point of view, materialized in Oracle.
    problem that we get here is fast refresh option is not available.each day it will pick up all of the data source.
    is it possible to use Fast refresh in this scenario?

    Thanks in advance.

    Kind regards
    Balaram.

    You can try MS SQL replication.
    Configure transactional Standard of MS SQL and Oracle Publication subscriber http://msdn.microsoft.com/en-us/library/ms151738%28v=sql.90%29.aspx

  • ORA-12028: type of materialized view is not supported by the main site

    Hi guys!

    We face a problem these days about the materialized view.

    We have upgraded database version 9.2.0.7 directly to 10.2.0.5 (RHEL4 x 86) on the same host. Database uses the driver dg4odbc to connect with remote SQL Server 2012 through data binding called MIKSERI. Our developer team would like to have replicated SQL server table data side Oracle using the materialized view.

    They created Materialized view, but it is not at all to refresh the data. I tried to study a little bit, and whenever I try to change the view anyway I hit error:

    ORA-12028: view type is not supported by the master site materialized @ 'MIKSERI '.

    ORA-06512: at line 22

    I looked at the solutions proposed and discovered that it is maybe the compatible database parameter, so I changed from previous 9.2.0.0.0 to 10.2.0.1.0 but still no luck. Just to emphasize this database is of course different clone of production to a different database, with db name retained and other parameters, but on another host computer and listening port. I even try to change global name, but still no luck.

    Main problem is that refresh the work does not at all. To be more precise, we have created MV on the side of the Oracle and FULL Refresh should be done every 3 minutes. MV uses HS db link to the sql server database.

    During the creation of MV, we can see currently given to sql server, but the problem is that we cannot do MV to refresh every 3 minutes. When I try to change MV and put the refresh interval I get above error.

    Any kind of help would be greatly appreciated,

    Thank you

    I found the reason why my MV update jobs failed, job_queue_processes parameter was equal to 0. I change this setting and now works fine.

    Thank you for your time!

  • I get "failed to set the refresh attribute COMMIT for the materialized view" when I try to create a MV using a table and another MV

    Experts,

    I'm trying to create a YOUNG refreshable ON COMMIT MV (xyz) using a table (circuit) and quickly updateable on validation MV (abc), but get an error:

    SQL error: ORA-12054: cannot set the attribute ON COMMIT refresh for the materialized view

    12054 00000 - "cannot set the refresh attribute COMMIT for the materialized view.

    * Cause: The materialized view did not meet the requirements for update to

    moment of validation.

    * Action: Specify only valid options.

    1] MV abc
    = MV abc defined as below =.

    CREATE MATERIALIZED view abc_MV

    Immediate CONSTRUCTION

    REFRESH QUICKLY YOU COMMIT using constraints of trust

    WITH ROWID AS SELECT n.*,.

    n.ROWID noderowid

    node n

    where n.nodetype in (1610000069,1610007267);


    -Above works OK and MV connect you on table node is created successfully

    =====================================================

    [ 2] Circuit Board

    ======================================================

    CREATE MATERIALIZED VIEW LOG ON Cramer.Circuit WITH SEQUENCE, ROWID ( ) -all columns of table ofcircut parentheses

    INCLUDING THE NEW VALUES;

    -More top works OK and MV connect you on table circuit is created successfully

    ======================================================



    [3] trying to create MV xyz

    ======================================================

    CREATE MATERIALIZED VIEW LOG ON cramer.abc_MV WITH SEQUENCE, ROWID ( ) -all columns of abc_MV brackets

    INCLUDING THE NEW VALUES;

    -Above works OK and log on ABC MV MV gets created successfully

    -Problematic step below

    Xyz_MV CREATE MATERIALIZED VIEW

    IMMEDIATE CONSTRUCTION

    REFRESH QUICKLY YOU COMMIT using constraints of trust

    AS

    SELECT c., c.rowid circuit_rowid, n.rowid tr_rowid

    the circuit c, abc_mv n

    where circuit2startnode = n.nodeid

    and c.rpplanId = n.rpplanId;
    ==========================================================

    Clues on how to solve this problem and make quickly updatable ON Commit MV xyz

    Thanks in advance.

    Chanchal,

    If you can read my original post carefully you may have noticed that all these restrictions will not apply in my case.

    All,

    In any case I found the solution to my problem.

    There are a few additional restrictions for materialized views multilayer

    Additional Restrictions for master materialized views

    The following types of materialized views may not be masters of editable materialized views:

    • ROWIDmaterialized views
    • Complex materialized views
    • Read-only materialized views

    I've updated the underlying MV abc below and everything worked like a charm

    CREATE MATERIALIZED view abc_MV

    Immediate CONSTRUCTION

    REFRESH QUICKLY YOU COMMIT using constraints of trust

    IN SELECT

    n.*, n.rowid noderowid, nt.rowid nodetyperowid

    the node n, nodetype_m nt

    where n.node2nodetype = nt.nodetypeid

    and nt.nodetypeid in (1610000069,1610007267);

    Note: To ADD a join without which I was getting error below (although had primary key on the table of the node)

    SQL error: ORA-23415: materialized view log for "NODE" does not save the primary key

    23415 00000 - "view the log for materialized \"%s\".\"%s\"does not save the primary key.

    * Cause: A primary key materialized view is refreshed quickly, but the

    The materialized view log does not record the primary key information.

    * Action: Use CREATING MATERIALIZED VIEW LOG... Command to add a PRIMARY KEY to

    start recording of the primary key information in the materialized view

    Newspaper.

  • Fast refresh materialized view problems

    I have two databases (A and B).

    In A database, user NICK has a table called COLOUR_MASTER.
    Also in this database, NICK issues creating materialized command newspaper view colour_master with the primary key, including the new values (and Yes, there is a primary key defined for this table)
    In database B, there is a link of database called A_LINK, connect, Nick, identified by password using 'dbA ';
    In database B, user IAN also creates a materialized view CM_MV cool off quickly in select * from colour_master@A_LINK

    This statement is done correctly, and there are several million lines in CM_MV when it's done.

    Immediately, IAN issued this command:

    Start
    dbms_mview. Refresh ('CM_MV');
    end;

    .. .and after a small pause, it gets the error

    ORA-12008: error path refresh materialized view
    ORA-02068: following sever error of A_LINK
    ORA-03113: end of file on communication channel

    One more + "select count (*) of colour_master@A_LINK" + subject immediately manages to return the correct number of records in the database so A 3113 is a bit misleading, I think that, in this case have crash, the database remains accessible at all times, there is no network problem (database A and B are both located in the same server so it of not like I'm trying of) connect to halfway around the globe).

    The only thing I can think is that there is a permissions issue causes this error. The creation of MV because is made via a link, it is not a problem of IAN see all appropriate, but once the updates come into play, it is perhaps.

    Any who can shed light on why I can't do the fast refresh from the view, I can create joyfully, please?

    I'm surprised no one asked you to do what is obvious: try to do a select * from colour_master@A_LINK, without that being wrapped in a create materialized MATERIALIZED view. Just do a simple select * from...

    My bet is that you will get an error ORA_22992 can not use selected from the remote tables LOB Locators . And if you can't do a simple select * in a remote table, I suspect that you can reasonably expect Fireworks when you try to create or refresh a view materialized on such a thing!

    Here's a quick test:

    In the 1 database:
    =========

    SQL> create table A (col1 varchar2(2), col2 clob);
    Table created.
    
    SQL> alter table A add constraint A1 primary key (col1);
    Table altered.
    
    SQL> insert into A values ('AA','This is an entry into a clob column');
    1 row created.
    
    SQL> commit;
    Commit complete.
    
    SQL> create materialized view log on A with primary key including new values;
    Materialized view log created.
    

    In the database 2
    =========

    SQL> connect ims_global/v0yager1@ussd
    Connected.
    
    SQL> create materialized view B refresh fast as
      2  select * from A@remotedb_link;
    
    Materialized view created.
    
    SQL> exec dbms_mview.refresh('B');
    BEGIN dbms_mview.refresh('B'); END;
    
    *
    ERROR at line 1:
    ORA-12008: error in materialized view refresh path
    ORA-02068: following severe error from REMOTEDB_LINK
    ORA-03113: end-of-file on communication channel
    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
    
    SQL> drop materialized view B;
    Materialized view dropped.
    
    SQL> create materialized view B refresh fast as
      2  select col1 from A@ims_link;
    
    Materialized view created.
    
    SQL> exec dbms_mview.refresh('B');
    PL/SQL procedure successfully completed.
    

    Which seems to reproduce your problem rather well, I think.

    I don't know if there is no work around for this. I mean, obviously you can't miss the CLOB column in your statement of 'create a MV' as I just did, but I don't know if you're still allowed or expected to be able to create a MV on lob columns and that such and such correction will allow you to do. Maybe someone else can provide this information.

    But at least you won't have to play Russian roulette with your init.ora parameters!

  • What is the desertion of orderly materialized view with MLOG$.

    I have 11.2.4.0 Oracle enterprise edition.

    I want to remove completely the MATERIALIZED view and MATERIALIZED view logs.


    I need to do this on a production of databases.


    It's the right order?

    Thank you.

    You can drop the materialized view log first, then the materialized views.

    Because when you drop a materialized view log is therefore more available to fast refresh, however, it is available to rewrite, so drop materialized view log first, then materialized views. Additional information provided below may help Doc Oracle.

    If you delete a simple materialized view that is the least recently refreshed materialized view of a main table, then the database automatically purges the materialized master table see only connect the required lines to refresh the materialized view has fallen.

    If you delete a materialized view that was created on a predefined table, then the database removes the materialized view, and table preconstruitse returns to his identity in a table.

    When you delete a master table, the database does not automatically drop the materialized views based on the table. However, the database returns an error when it tries to refresh materialized view based on a main table that has been abandoned.

    If you delete a materialized view, then all the compiled queries that have been rewritten to use the materialized view will be invalidated and recompiled automatically. If the materialized view was preconstruitse on a table, then the table is not deleted, but it can no longer be maintained by the materialized view refresh mechanism.

  • Problems with the materialized view

    Hello

    I need help enforce data integrity using a materialized view. In my example, each system can consist of three types of components, and it is modeled using the supertype/subtype relationships. I'm trying to argue that, for a given system, a component cannot reside in more than one table of components. For example, given the system 1, if A component exists in the mobile_components table, it is impossible to insert into the table desktop_components for system 1. Rather than using triggers, I try to use views materialized with unique constraint to enforce this rule based on the example of "The trouble with triggers" article http://www.oracle.com/technetwork/issue-archive/2008/08-sep/o58asktom-101055.html of Tom Kyte. However, I can't seem to make it work because it gives me ORA-12054: cannot set the ON COMMIT refresh attribute.  I use UNION ALL and I know that can be difficult, but I can not understand what are the rules I'm breaking.  I have the necessary privileges.  Oracle 11g.  Can anyone help?

    Thank you

    Mark

    create table systems (
    sys_id number,
    sys_name varchar2(100),
    constraint sys_pk primary key (sys_id),
    constraint sys_uk unique (sys_name));
    
    insert into systems values (1,'System 1');
    insert into systems values (2,'System 2');
    
    
    

    create table mobile_components (
    mo_comp_id number,
    mo_comp_name varchar2(100),
    mo_comp_sys_id number,
    constraint mo_pk primary key (mo_comp_id),
    constraint mo_uk unique (mo_comp_name, mo_comp_sys_id),
    constraint mo_fk foreign key (mo_comp_sys_id) references systems (sys_id));
    
    insert into mobile_components values (1,'Component A',1);
    insert into mobile_components values (2,'Component A',2);
    
    
    

    create table desktop_components (
    de_comp_id number,
    de_comp_name varchar2(100),
    de_comp_sys_id number,
    constraint de_pk primary key (de_comp_id),
    constraint de_uk unique (de_comp_name, de_comp_sys_id),
    constraint de_fk foreign key (de_comp_sys_id) references systems (sys_id));
    
    insert into desktop_components values (1,'Component B',1);
    insert into desktop_components values (2,'Component B',2);
    
    
    

    create table internet_components (
    in_comp_id number,
    in_comp_name varchar2(100),
    in_comp_sys_id number,
    constraint in_pk primary key (in_comp_id),
    constraint in_uk unique (in_comp_name, in_comp_sys_id),
    constraint in_fk foreign key (in_comp_sys_id_ references systems (sys_id));
    
    insert into internet_components values (1,'Component C',1);
    insert into internet_components values (2,'Component C',2);
    
    
    

    create materialized view log on mobile_components with rowid;
    create materialized view log on desktop_components with rowid;
    create materialized view log on internet_components with rowid;
    
    
    

    create materialized view mv_components
    refresh fast on commit with rowid as
    select rowid as row_id, mo_comp_id as comp_id, mo_comp_name as comp_name
    from mobile_components
    union all
    select rowid, de_comp_id, de_comp_name
    from desktop_components
    union all
    select rowid, in_comp_id, in_comp_name
    from internet_components;
    
    alter table mv_components add constraint mv_comp_uk unique (comp_id, comp_name);
    
    
    

    You need a column marker to distinguish which questions you Union, that the data are:

    for example

    Create materialized view mv_components

    cool off quickly on commit with rowid as

    Select 'a' marker, rowid as row_id, mo_comp_id as identifiant_composant mo_comp_name as comp_name

    of mobile_components

    Union of all the

    Select 'b', rowid, de_comp_id, de_comp_name

    of desktop_components

    Union of all the

    Select 'c', rowid, in_comp_id, in_comp_name

    of internet_components;

  • fast refresh on MATERIALIZED VIEW

    Oracle 10 g R2 (10.2.0.5)

    Scott.mv_test CREATE MATERIALIZED VIEW
    Users TABLESPACE
    NOCACHE
    LOGGING
    NOCOMPRESS
    NOPARALLEL
    IMMEDIATE CONSTRUCTION
    REFRESH THE STRENGTH TO DEMAND
    WITH THE PRIMARY KEY
    AS
    Select...

    I this MV, when I do the QUICK refersh as follows, I get the error message

    SQL > execute DBMS_MVIEW. REFRESH ('MV_TEST', 'f');
    DBMS_MVIEW BEGIN. REFRESH ('MV_TEST', 'f'); END;

    *
    ERROR on line 1:
    ORA-12004: QUICK COOLING can be used to view materialized "SCOTT." "" MV_TEST ".
    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

    But it works with full refresh.

    Is this planned, any help would be appreciated.

    Thank you
    ORA-12004: REFRESH FAST cannot be used for materialized view "string"."string"
    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.
    

    http://ORA-12004.ora-code.com/

  • Materialized view DDL

    I try to get the DDL for all materialized views in the database.
    I am using under sql, but somehow, it does not understand it and gives me errors as follows:

    SELECT DBMS_METADATA. GET_DDL ('MATERIALIZED VIEW', 'MV_NAME'), FROM DBA_OBJECTS;
    or
    SELECT dbms_metadata.get_ddl (OBJECT_TYPE, OBJECT_NAME, OWNER) IN DBA_OBJECTS
    WHERE
    OBJECT_TYPE AS "MATERIALIZED VIEW.

    Gives me error like below:
    ERROR:
    ORA-31600: entry invalid value MATERIALIZED VIEW for the OBJECT_TYPE parameter in GET_DDL function
    ORA-06512: at "SYS." Dbms_metadata", line 2682
    ORA-06512: at "SYS." Dbms_metadata", line 2733
    ORA-06512: at "SYS." Dbms_metadata", line 4333
    ORA-06512: at line 1

    Is there anyway I can get DDL for all the materialized view... ?
    Anyhelp is appreciated.
    JP

    Hi, the valid object types do not have spaces, according to [this table | http://download.oracle.com/docs/cd/E11882_01/appdev.112/e10577/d_metada.htm#BGBIEDIA].

    Try this:

    SELECT owner, object_name, object_type, dbms_metadata.get_ddl(replace(OBJECT_TYPE, ' ', '_'), OBJECT_NAME,OWNER)
      FROM DBA_OBJECTS
     WHERE OBJECT_TYPE = 'MATERIALIZED VIEW'
    

    I didn't really take a broad look to check on each type of object, but this should work for at least materialized views. If this does work for other specific types you want, you may need to use decode or an expression box.

Maybe you are looking for

  • Cannot uncheck Safari preference to "Open 'safe' files after downloading".

    The option to open the 'reliable' files after downloading Safari preferences (general tab) is grayed out so that the selection cannot be changed. It is currently enabled, and I want to uncheck. Running OS - X El Capitan version 10.11.4 on a Macbook o

  • Home page load another page

    When I start Firefox 3.6.10, or click the icon for my homepage, I have another web page, specifically "Parallels H-Sphere" web page with "Forbidden" in this topic. Even when I type in my address of the home page (my ISP) as a web address, click on th

  • Laptop HP ProBook s 4540: lack of Base system device drivers

    Hello Currently, I have a laptop HP ProBook 4540 s notebook PC (Energy Star) and found that my Base system device driversare missing. I have tried very hard to find, but in vain. Honestly, I don't even know not what they are or what they do, but I'm

  • G3605 win8.1 oem

    I want to know if my office is compatible with a finger digit usb drive.

  • County to return read VISA does not match number of bytes

    I encounter an error with a VISA reading.  I ask 8 bytes (in number of bytes), but get only 7 return (return number), which causes errors in my code downstream.  Curiously, the VISA Read block does not return an error.  Any ideas on how to debug this