How to view SQL for a materialized view in SQL Developer (Oracle 11g R2)

Good Morning,
I am new to SQL Developer 3.1.07 and just installed it on a Windows 7 PC yesterday.
There's a materialized view for which I need to view (and eventually update) the SQL. The mat'lized view is in another schema, but my Oracle user does have access to the schema and to this particular mat'lized view. My user also has SELECT, INSERT, UPDATE, DELETE, DEBUG, and ALTER permissions. When I select (click on) the matl'ized view in the object tree on the left, a multi-tab window opens with information in the Columns, Indexes, Grants, Dependencies and Details tabs, but the SQL pane is blank. I don't know if there's some other GRANT that I need in Oracle, or if there's something else I need to do in SQL Developer to see the matl'ized view SQL.
Thanks
Bob Gardner
[email protected]

1007420 wrote:
There's a materialized view for which I need to view (and eventually update) the SQL. The mat'lized view is in another schema, but my Oracle user does have access to the schema and to this particular mat'lized view. My user also has SELECT, INSERT, UPDATE, DELETE, DEBUG, and ALTER permissions. When I select (click on) the matl'ized view in the object tree on the left, a multi-tab window opens with information in the Columns, Indexes, Grants, Dependencies and Details tabs, but the SQL pane is blank. I don't know if there's some other GRANT that I need in Oracle, or if there's something else I need to do in SQL Developer to see the matl'ized view SQL.SQL*Developer can be tricky regarding what it shows for other schemas. I'm not sure what privileges you might need besides the one you listed except RESOURCE on the MV, or maybe CREATE ANY MATERIALIZED VIEW.
Can you use DBMS_METADATA.GET_DDL to get the data you want (may/may not work due to privileges)?

Similar Messages

  • How to create transaction for a maintenance view, Thank you.

    How to create transaction for a maintenance view,
    Thank you.
    deniz...

    Hi Deniz,
    Go to se93.
    Then create the new T.code.
    Under that select parameter Transaction.
    Then give the sm30 in the t.code in default values tab.
    check the checkbox skip initial screen.
    in classification tab.
    click checkbox inherit gui attributes..
    Now below..
    In the default values..
    select
    viewname and give ur table name.
    UPDATE= Xsave
    view - table name ( Should be upper case
    update X ( should be upper case).
    http://www.sap-basis-abap.com/sapbs011.htm
    Hope this helps you.
    Regards,
    Viveks

  • How  Assign a Buyer for Each Material

    Dear experts ,
                        How  Assign a Buyer for Each Material ,  for example,This person is going to buy this material in purchase dept. is there any  possiblities
    regards,
    Raja

    hello,
    u can achieve same results by following simple way
    create purchase document types for example for raw material purchase,consumable purchase etc
    then assign buyer from personal setting from each buyers computer.
    regards
    kedar

  • How to extend sales views extension for purchase material?

    Dear MM experts,
    pl let us know how purchase material master is extended with sales views.
    we have defined material for purchase views only, now we have requirement of sales views for the same material. Please let us how this can be done.
    Thanks in advance
    best regards
    Srihari

    Hi srihari,
    It maily depends on the user departmentt which you have selected in OMS2 Transaction...
    Normaly in standard ROH will not be having Sales view selected.
    in FERT ( finished) and HALB( semifinished) material type will be having sales views.
    If your materrila wihich is having the materila type ROH you cant extend the materila to sales view... you need to change the materila type in this scenario...
    or else create one more materila with FERT ( finished) and HALB( semifinished) material type and maintain the details in the required fields in purchase and sales as well.
    REgards
    Anand

  • How can I manually refresh a Materialized View

    Hi,
    There's a materialized view created in 2006 as under:
    CREATE MATERIALIZED VIEW "schema"."mv_name"
    USING INDEX
    REFRESH FAST ON DEMAND
    WITH PRIMARY KEY USING DEFAULT LOCAL ROLLBACK SEGMENT
    DISABLE QUERY REWRITE AS SELECT * FROM "table_name@dblink;
    The problem is that the last refresh was done in Aug. I want to manually refresh this materialized view right now as there is a procedure based on this MV and its not showing the right data as the above materialized view has not been refreshed, so the data for this month is not showing.
    Please let me know how I can refresh that MV right now.
    Also do I need to change the refresh option. How can I change it so that the MV refreshes itself every second.
    Thanks

    Also do I need to change the refresh option. How can
    I change it so that the MV refreshes itself every
    second. Every second? Why do you want to do that?? Perhaps waht you really want is refresh the MV on commit.

  • SQL command of Materialized View Relication in Oracle XE

    Hi, all,
    While waiting for the machine to be OK, I decide to post my understand of materialized view replication here and please point me anything incorrect.
    I have two machines A and B, I want to make A as a master and B as replica, to replicate table test.
    On A:
    create materialized view log on test;
    On B:
    create database link dbl_a
    connect to SYSTEM identified by password
    using '(DESCRIPTION =
    (ADDRESS_LIST =
    (ADDRESS = (PROTOCOL = TCP)(HOST = a)(PORT = 1521))
    (CONNECT_DATA =
    (SID = XE)
    create materialized view test_mview as select * from test@dbl_a;
    At last, when I want to make a synchronization, I run
    On B:
    EXECUTE DBMS_MVIEW.REFRESH('test_mview');
    Any point is appreciated.
    Best wishes,
    Kemian

    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>                                                                               

  • SQL Loader or Materialized view

    Can we achive the following SQL Loader ?
    If yes can someone point me out some ling
    Requirement:
    We need to create a Reporting DB to use for Reporting and a Transactional DB will be in separate Host. Basically we need to pull data from a set of tables from Transactional DB and move to Reporting DB schema at proper intervals.
    We might have to get data from different column from different tables and store it in a single table/multiple tables in Reporting DB
    If as part of housekeeping of the Source database we delete some records (older records), In that case we have to ensure that this delete does not happen in reporting DB

    Materialized view will be the best option for this. You can schedule jobs for refreshing the Materialized view at some interval. If you use sqlloader you need to do some coding.
    http://download.oracle.com/docs/cd/B19306_01/server.102/b14226/repmview.htm#REPLN003
    Edited by: sac on Nov 16, 2009 10:58 AM

  • How Fast is the Fast Refreshed Materialized View ?

    Hi all,
    In our Front End aplication we have two big view :
    V_ALL_TRANS -> this is UNION ALL on about 10 transaction tables
    V_SUMM_TRANS -> this query with SUM & GROUP BY on V_ALL_TRANS.
    We are having performance problem on V_SUMM_TRANS, I am thinking of making V_ALL_TRANS as materialized view.
    The requirement is : every INSERT on the transaction tables ( and some tables with INSERT & UPDATE) will "immediately reflected" in V_ALL_TRANS.
    Is this a possible approach ?
    How "immediate" the refreahed will be done by oracle ?
    Thank you very much for your help,
    xtanto

    hi,
    Of course this is a possible approach.
    I think we have a time that which we can keep with for ther refresh in materialized views.
    but using that may become yet another cause of concern because ur front end may experience performance problems if all the time refresh is going on thru materialized views.
    Maybe you can time the refreshes to happen at nigh when the user usage is very low..

  • How can I fast refresh the  materialized view !!

    I created a MV base on some tables in order to improve the querey speed.
    but the mv I have created falied to refresh fast.
    because there are two same table in the from clause:
    jcdm jc1,jcdm jc2
    create materialized view temp_mv
    nologging
    pctfree 0
    storage (initial 2048k next 2048k pctincrease 0)
    parallel
    build immediate
    refresh force
    on demand
    as
    select
    TAB_GSHX.rowid hx_rid,
    TAB_GSHD.rowid hd_rid ,
    JC1.rowid jc1_rid ,
    JC2.rowid jc2_rid ,
    YSHD_ID     HXID,          
    JC1.JCDM     QFD,     
    JC2.JCDM     JLD     
    FROM
    TAB_GSHX,
    TAB_GSHD,
    jCDM JC1,
    JCDM JC2
    WHERE
    YSHD_ID=YSHX_ID
    AND YSHD_QFD=JC1.JBJC_ID
    AND YSHD_JLD=JC2.JBJC_ID
    AND TO_CHAR(YSHX_time,'YYYYMMDD')='20030101'
    the column msgtxt of the table MV_CAPABILITIES_TABLE is :
    "the multiple instances of the same table or view" and " one or more joins present in mv".
    How can I succeed in fast refresh the above temp_mv!!!
    thanks.

    lianjun,
    When you are using Oracle9i there is a procedure which can help you setup the materialized view. If some option isn't working it gives you hint why it doesn't work.
    The procedure is dbms_mview.explain_mview.
    Take a look at the documentation how to use it. (In the Oracle9i DWH guide the package is explained.)
    Hope this helps
    With kind regards,
    Bas Roelands

  • How to Extract Data for a Maintenance View, Structure and Cluster Table

    I want to develop  3 Reports
    1) in First Report
    it consists only two Fields.
    Table name : V_001_B
    Field Name1: BUKRS
    Table name : V_001_B     
    Field Name2: BUTXT
    V_001_B is a Maintenance View
    For this one I don't Find any Datasource
    For this Maintenance View, How to Extract the Data.
    2)
    For the 2nd Report also it consists Two Fields
    Table name : CSKSZ
    Field Name1: KOSTL (cost center)
    Table name : CSKSZ
    Field Name2: KLTXT (Description)
    CSKSZ is a Structure
    For this one I don't Find any Datasource
    For this Structure How to Extract the Data
    3)
    For the 3rd Report
    in this Report all Fields are belonging to a Table BSEG
    BSEG  is a Cluster Table
    For this one also I can't Find any Datasource,
    I find very Few Objects in the Datasource.
    For this One, How to Extract the Data.
    Please provide me step by step procedure.
    Thanks
    Priya

    Hi sachin,
    I don't get your point can you Explain me Briefly.
    I have two Fields for the 1st Report
    BUKRS
    BUTXT
    In the 2nd Report
    KOSTL
    KLTXT
    If I use  0COSTCENTER_TEXT   Data Source
    I will get KOSTL Field only
    what about KLTXT
    Thanks
    Priya

  • Help with sql query on materialized view logs

    I am in need of a query to find out what tablespace and snap shot site a long list of materialized view logs are associated with.
    something like below except tablespace and snap_shot_site are not an option for this table.
    select log_owner, master, log_table, tablespace, snap_shot_site from dba_mview_logs;

    What is the refresh method set as?
    Could you paste the full MV log creation script and the corresponding MV creation script.

  • Error for Refresh Materialized View

    Hi, All
    I get a error when I refresh the Materialized View, But I can't solve this error.
    ORA-12008: error in materialized view refresh path
    ORA-04045: errors during recompilation/revalidation of MV_NAME
    ORA-00600: internal error code, arguments: [qsmqSetupTableMetadata-2], [], [], [], [], [], [], []
    ORA-06512: at "SYS.DBMS_SNAPSHOT", line 2255
    ORA-06512: at "SYS.DBMS_SNAPSHOT", line 2461
    ORA-06512: at "SYS.DBMS_SNAPSHOT", line 2430
    ORA-06512: at line 1
    Do you know how I can solve this problem?
    Please let me know that.
    JWS

    hi,
    can u give some info... like whether the MVs are and from where you are trying to refresh...... we also had similiar prob when we tried to refresh the MV in Schema A from Schema B
    rgds
    Mahesh

  • Support for 8i materialized views

    Hi
    Can anyone pls explain in breif what does the new feature "discoverer 4.1 admn supports oracle 8i materialized views" mean???
    I just have an idea what a materilazed view mean..but iam unable to comprehend how discoverer uses or supports this feature.
    Pls help me
    Harati

    While it is certainly true that a query with a UNION may be complex, it is relatively rare that it must be complex. The two things that make a UNION query complex in 10.1 (the criteria do tend to change in different releases) are
    - One of the queries that is being UNIONed is complex
    - The columns in the SELECT list do not match
    In the first case, the root cause of the complexity is not the UNION, so I assume that's not what you have. The second case is generally pretty trivial to resolve, so it would be pretty rare that this would be a roadblock.
    Of course, if you mean that you have a UNION ALL, not a UNION, you have a rather different problem.
    Justin

  • Job for refreshing materialized view will be failed by manually is ok

    Hello to all
    I have created a read only materialized view and i have created a
    stored procedure tha calls DBMS_MVIEW.REFRESH for refreshing the
    materialized view by this script
    CREATE MATERIALIZED VIEW "REZA"."T1_MV2"
    REFRESH FAST WITH PRIMARY KEY
    AS SELECT "T1"."ID" "ID","T1"."NAME" "NAME" FROM "REZA"."T1"@TEHRAN.COM "T1";
    create or replace procedure refresh_mv
    as
    begin
    DBMS_MVIEW.REFRESH (list=>'reza.t1_mv2',push_deferred_rpc=>false,method=>'f');
    end;
    and i have created a job for calling refresh_mv frequently by this script
    DBMS_SCHEDULER.CREATE_JOB (
    job_name => 'MV_JOB',
    job_type => 'STORED_PROCEDURE',
    job_action => 'reza.refresh_mv',
    start_date => SYSTIMESTAMP,
    repeat_interval => 'FREQ=SECONDLY;INTERVAL=90',
    end_date => null
    when i run this job by DBMS_SCHEDULER.RUN_JOB all thing is right and the materialized view will be update
    and STATUS filed in ALL_SCHEDULER_JOB_LOG is SUCCEEDED for that execution
    and it's completion duration is very short (+000000000 00:00:00.141000)
    but when the job execute in its time (my mean is every 90 second) that will be failed and materialized view don't update
    and STATUS filed in ALL_SCHEDULER_JOB_LOG is FAILED for this job
    do you know what is wrong?
    thanks

    thank all of you i myself found the problem that was because of DATABASE LINK i used fixed user database link
    and then the problem refined

  • How to retrieve PARTNER_NUMBER for PARTNER_FCT from view IBRELATION/Partner

    Hi Experts,
    I've added an enhancement field in IBDETAIL/Header. Within the V-GETTER of this new field I need to retrieve PARTNER_NUMBER of a specific PARTNER_FCT (Partner Function), say '00000002'.
    IBDETAIL is one of the views in the component IBMAIN, which I'm working on.
    Thanks In Advance,
    Regards,
    Nhlanhla

    This thread was resolved [here|How to retrieve PARTNER_NUMBER from IBRELATION/Partner view (Install bases);.
    Regards,
    Nhlanhla Ndlovu

Maybe you are looking for

  • Usb-6009 analog output voltage

    Hi, The usb-6009 has two 0-5 volts analog ouputs. Is it possible to connect them in series, in order to get a single 0-10 volts analog output channel ? Thanks, Nicolas

  • ALTERNATIVE FOR 'SELECT TOP STATEMENT

    HI FRIENDS IF ANY ONE KNOWS HOW TO CONVERT THE SQL STATEMENT GIVEN BELOW PLEASE HELP ME SELECT TOP 1 CardID FROM EasyRechargeMaster WHERE CardGroup = EasyRecharge.CardGroup THANKS & REGARDS

  • Migrating to BI

    Hi professionals, I am working in a ALE/IDOC support project for past 2 years and I am an ABAP certified consultant. Now I am planning to take up BI certification through TechEd. I have few doubts, 1. Is Bi certification taken through teched is simil

  • How to convert fcp file?

    Hey I have a Final Cut Pro file (blahblah.fcp). When I click on more info it says the kind is a Unix Executable File. This file is a few years back so can't remember what I did to save it and dont have final cut pro anymore but is there anyway I can

  • Paper too small

    I am trying to print a week calendar, and keep getting "The paper is too small." That is even though I have been able to print one week that way. How to I adjust the iCal week so that it will print?