Results 1 to 6 of 6
  1. #1
    Join Date
    Mar 2004
    Posts
    2

    Red face Unanswered: materialized view script / code

    I am moving materialized view from one database to another... but unfortunately, we don't have the original create script for the materialzied view.

    How do I get the original scripts/code that created the materialzied view ? and can I just transfer the objects ?

    Thanks.

  2. #2
    Join Date
    Jul 2003
    Posts
    2,296
    transferring MVs has never worked for me.
    It ends up a table instead of an MV
    - The_Duck
    you can lead someone to something but they will never learn anything ...

  3. #3
    Join Date
    Mar 2004
    Posts
    2
    How do I get the original script that created the MV ?

    Originally posted by The_Duck
    transferring MVs has never worked for me.
    It ends up a table instead of an MV

  4. #4
    Join Date
    Mar 2004
    Posts
    4
    Try this..

    select
    DBMS_METADATA.GET_DDL('TABLE','<MV name>') from dual;

  5. #5
    Join Date
    Jul 2003
    Posts
    2,296
    Originally posted by ZeeshanKhan
    Try this..

    select
    DBMS_METADATA.GET_DDL('TABLE','<MV name>') from dual;
    Interesting, but that doesn't work. All that did when I tested it was
    make a create-table statement.

    Even export/import just creates a table based on the MV.
    You don't even get the view log that you need.
    - The_Duck
    you can lead someone to something but they will never learn anything ...

  6. #6
    Join Date
    Mar 2004
    Posts
    4
    Use some tool like TOAD. You can download trial version i think...

Posting Permissions

  • You may not post new threads
  • You may not post replies
  • You may not post attachments
  • You may not edit your posts
  •