List the base tables of a view

Hi All,
I have a view but I do not have any information about the base tables and the query that was used to set up this view. Is there a way to atleast list the base tables on which the view was created!
Thanks in advance!
~

SQL> desc user_source
Name Null?
Type
NAME
ARCHAR2(30) - > Name of the View.
TYPE
ARCHAR2(12)
LINE
NUMBER
VARCHAR2(4000) -> will give you the text to
create the View.-----------------------------------------------------------------------------------------------------------------------
For some reason the view I have is not listed in the NAME ..

Similar Messages

  • Finding the base tables of a database view

    Hi
    I have a database view like VIQMEL, VIQMSM .So how can i find the what are the base tables for these views.
    pls let me know
    kumar

    Hi ,
    In SE11,
    1. Type in VIQMSM.
    2. Display
    3. you have a tabe "Table & Join Condition.... to list all the releated tables for this view...
    If the hint is useful… Say thanks by reward….
    Regards,
    Prabhu Rajesh

  • Getting list of base tables of view

    Hi,
    how to find the list of base tables of some partuicular view ?

    Try this
    SQL>desc user_dependencies
    Name                                      Null?    Type
    NAME                                      NOT NULL VARCHAR2(30)
    TYPE                                               VARCHAR2(18)
    REFERENCED_OWNER                                   VARCHAR2(30)
    REFERENCED_NAME                                    VARCHAR2(64)
    REFERENCED_TYPE                                    VARCHAR2(18)
    REFERENCED_LINK_NAME                               VARCHAR2(128)
    SCHEMAID                                           NUMBER
    DEPENDENCY_TYPE                                    VARCHAR2(4)

  • Query to find the Base tables of views

    Hi,
    Can you pl let me know the query to find the base tables on which the view is based.I looked into views like ci_view_definitions but i could not find them.
    Thanks for your help
    thanx,
    Suji.

    select vw.name viewname, nvl( tabdef.name, vwdef.name) "based on"
    from   ci_view_definitions vw
    ,      i$sdd_vwtab
    ,      ci_view_definitions vwdef
    ,      ci_table_definitions tabdef
    where  view_ref = vw.id
    and    table_ref = tabdef.id (+)
    and    table_ref = vwdef.id (+)

  • How to update view  without modifying the base table ?

    Hi Experts , I need help in two qurstions
    1. How to update a view without modifying the base table ?
    2. How to write a file unix operating system in pl/sql ? is there any built in procedure is there ?
    Thank you

    Hi,
    I'm not sure what you're asking in either question. It would help if you gave a specific example of what you want to do.
    SowmyRaj wrote:
    Hi Experts , I need help in two qurstions
    1. How to update a view without modifying the base table ?You can't.
    Views don't contain any data; they just query base tables.
    You can change the definition of a view (CREATE OR REPLACE VIEW ...) so that it appears that the base table(s) have changed; that won't change the base tables.
    2. How to write a file unix operating system in pl/sql ? is there any built in procedure is there ?The package utl_file has routines for working with files.

  • Updating base table with Materialized View's data

    Hi,
    In order to update base table with MVs data, I am trying real time data transfer between two databases. One is Oracle 8i and other is Oracle 9i. I have created an updatable MV in 9i on a base table using database link. The base table is in 8i. Materialized View log is created in 8i on base table. MV has to be associated to some replication group, but I am not able to create replication group in 9i to which MV has to be associated. The required packages are not installed.
    Replication packages are to be used to create replication group are :
    /*Create Materialized View replication group*/
    BEGIN
    DBMS_REPCAT.CREATE_MVIEW_REPGROUP (
    gname => 'TEST_MV_GRP',
    master => 'TEST_DATA_LINK',
    propagation_mode => 'ASYNCHRONOUS');
    END;
    But above block is giving error.
    Can anyone suggest how to resolve this, or are there any other approaches (by not using replication packages) to update base table with MVs data ?
    Thanks,
    Shailesh

    Yes, I created link between two databases and was able to update tables on 8i from 9i database using that link.
    The error I am getting while creating replication group is :
    ORA-06550
    PLS-00201 : identifier 'SYS.DBMS_REPCAT_UTL2@'TEST_DATA_LINK' must be declared
    ORA-06550
    PLS-00201 : identifier 'SYS.DBMS_REPCAT_UNTRUSTED@'TEST_DATA_LINK' must be declared
    ORA-06512 : at "SYS.DBMS_REPCAT_UTL", line 2394
    ORA-06512 : at "SYS.DBMS_REPCAT_SNA_UTL", line 1699
    ORA-06512 : at "SYS.DBMS_REPCAT_SNA", line 64
    ORA-06512 : at "SYS.DBMS_REPCAT", line 1262
    Is there any other approach which can be used to update base table with MVs data instead of using replication packages ?
    Thanks,
    Shailesh

  • Updating a Base Table through a View having UNPIVOT function.

    Hi,
    I have a requirement of updating a Base Table through a View.
    This View has the query using a UNPIVOT function for displaying the columns of the Base tables in rows.
    I need to update/insert into/delete the Base Table by accessing the View (The user doesn't have an access to the Base Table, hence the DML's on the View).
    Following is the table I've created:-
    CREATE TABLE PERSON_DETAILS
      PID            VARCHAR2(10 BYTE),
      FIRSTNAME      VARCHAR2(1000 BYTE),
      LASTNAME       VARCHAR2(1000 BYTE),
      PHONENUMBER    VARCHAR2(1000 BYTE),
      ADDRESS1       VARCHAR2(1000 BYTE),
      ADDRESS2       VARCHAR2(1000 BYTE),
      COUNTRY_CODE   VARCHAR2(1000 BYTE),
      LANGUAGE_CODE  VARCHAR2(1000 BYTE),
      EMAIL          VARCHAR2(1000 BYTE)
    )The sample values are inserted in this table through the below script:-
    insert into person_details values ('1','XYZ','ABC','1234567890','India','Asia','IN','EN','[email protected]');
    insert into person_details values ('2','XYZ2','ABC2','1234567890','India','Asia','IN','EN','[email protected]');The code for the view is as below:-
    CREATE OR REPLACE FORCE VIEW PERSON_DETAILS_VIEW
       PID,
       CD_NAME,
       CD_VALUE
    AS
       SELECT "PID", "CD_NAME", "CD_VALUE"
         FROM person_details UNPIVOT INCLUDE NULLS (cd_value
                             FOR cd_name
                             IN  (firstname AS 'First Name',
                                 lastname AS 'Last Name',
                                 phonenumber AS 'Phonenumber',
                                 address1 AS 'address1',
                                 address2 AS 'address2',
                                 country_code AS 'Country Code',
                                 language_code AS 'Language Code',
                                 email AS 'Email') );Below are the values from the view:-
    PID CD_NAME         CD_VALUE
    1    First Name       XYZ
    1    Last Name       ABC
    1    Phonenumber  1234567890
    1    address1         India
    1    address2         Asia
    1    Country Code   IN
    1    Language Code EN
    1    Email               [email protected]
    2    First Name       XYZ2
    2    Last Name       ABC2
    2    Phonenumber  1234567890
    2    address1         India
    2    address2         Asia 
    2    Country Code   IN
    2    Language Code EN
    2    Email               [email protected] user would fire some statement like below:-
    update person_details_view
    set cd_value = 'US' where CD_NAME = 'IN'The above statement should update the base table PERSON_DETAILS.
    I understand I can write an INSTEAD OF trigger but I do not know what logic to write in the trigger so that the requirement gets fulfilled.
    My Oracle Version
    Oracle Database 11g Enterprise Edition Release 11.1.0.7.0 - 64bit Production
    PL/SQL Release 11.1.0.7.0 - Production
    CORE    11.1.0.7.0    Production
    TNS for Solaris: Version 11.1.0.7.0 - Production
    NLSRTL Version 11.1.0.7.0 - ProductionAny help would be highly appreciated.
    Thank You,
    Ankit Khare.
    Edited by: Ankit_Khare84 on Jun 28, 2012 2:47 PM

    it is definitively possible with an instead of trigger.
    for Example:
    create or replace
    TRIGGER ioft_person
    INSTEAD OF UPDATE
    ON person_details_view
    FOR EACH ROW
    declare
    firstname1  person_details.firstname%type;
    BEGIN
                  SELECT firstname_new into firstname1
                  FROM   (SELECT pid, cd_name, cd_value
                          FROM  
                                  select * from person_details_view where (pid, cd_name) not in (select :new.pid, :new.cd_name from dual)
                                  union all
                                  select :new.pid, :new.cd_name, :new.cd_value from dual
                  PIVOT  ( max(cd_value) AS new FOR (cd_name) IN
                                                          ('First Name' AS firstname,
                                                            'Last Name' as lastname,
                                                            'Phonenumber' as phonenumber,
                                                            'address1' as address1,
                                                            'address2' AS address2,
                                                            'Country Code' as country_code,
                                                            'Language Code' as language_code,
                                                            'Email' as email
                  )  where pid = :old.pid;
      UPDATE person_details
      SET firstname = firstname1
      WHERE pid = :old.pid;
    END ioft_role_perm;and than run
    update person_details_view
    set cd_value = 'X|X' where cd_name = 'First Name' and pid=1The logic is: you must convert back the view through pivoting

  • Update the base table

    Hi experts help me,
    I have one requirment
    there have two machine(plant) fert1,fert2 each one have some materilas.
    from one of the plant  will be goining to stop(fert1).
    than we need featch the issued material from fert1 in reverse  order to store it than post the meterial into fert2 based on the production number.
    Please help me,
    THANKS advance
    Moderator message: "spec dumping", please work yourself first on your requirement.
    Edited by: Thomas Zloch on Oct 29, 2010 1:54 PM

    Hi,
    I'm not sure what you're asking in either question. It would help if you gave a specific example of what you want to do.
    SowmyRaj wrote:
    Hi Experts , I need help in two qurstions
    1. How to update a view without modifying the base table ?You can't.
    Views don't contain any data; they just query base tables.
    You can change the definition of a view (CREATE OR REPLACE VIEW ...) so that it appears that the base table(s) have changed; that won't change the base tables.
    2. How to write a file unix operating system in pl/sql ? is there any built in procedure is there ?The package utl_file has routines for working with files.

  • Dropping base table of materialized view

    HI please let me know what happens if i drop the base table of a materialized view? does the MV remain valid with data?

    Hi,
    Well, it's easy to test yourself.
    SQL> select count(*) from t1;
      COUNT(*)
           100
    SQL> desc t1
    Name                                      Null?    Type
    ID                                                 NUMBER(10)
    SQL> create materialized view t1_mv as select * from t1;
    Materialized view created.
    SQL> select count(*) from t1_mv;
      COUNT(*)
           100
    SQL> drop table t1 purge;
    Table dropped.
    SQL> select count(*) from t1_mv;
      COUNT(*)
           100
    SQL> desc t1_mv
    Name                                      Null?    Type
    ID                                                 NUMBER(10)
    SQL> select object_type, status from user_objects where object_name = 'T1_MV';
    OBJECT_TYPE         STATUS
    TABLE               VALID
    MATERIALIZED VIEW   INVALID
    SQL> select * from t1_mv where rownum < 5;
            ID
             1
             2
             3
             4
    SQL>I think the answer is very clear.
    Asif Momen
    http://momendba.blogspot.com

  • Data Not loaded from  ap_invoice_lines_interface to the base table

    Hi ,
    Please I'm working on Interface which load invoices from Cobol system to oracle , anyway procedure is working on fine & all data is loaded to the interface as i'm inserting 4 attributes which is DFF on the invoice line level
    Now when i ran the import program all data is loaded to the base table except one of the attributes isnot loaded .
    will anyone tell me what is the reason or how can i trace that ..........
    Thanks In Advance

    Dear All ,,,,
    Please i got it's a matter of size of the attribute1 segment i increased it ,,,,,,,,,but now the issue that data is saved in the base table but not showing in the screen
    will you please help me in that
    Edited by: miro_feps on May 21, 2012 1:01 AM

  • In 10g  ( 10.1.4.3)OID, what are the base tables

    Hi ,I need to clean the users and groups from the OID manually ( i have deleted them using bulkload but oid tree is inconsistent stage)
    so now i have to clean them from the base tables,
    anyone faced this situation before, appreciate your help.

    Check the ORACLE_HOME/ldap/log directory and the contents of oidmon.log and oidldapd01.log
    I found a similar error after the 10.1.4.3 upgrade and needed to rerun the root.sh script.
    It is helpful to shut everything down, cleanout the log files and file up OPMN (start) and the OID (using startproc).
    Good luck!

  • Index not using the base table

    Hi,
    In which scenario, a query will only use the index and not the base table. Please give me some example.
    Thanks,
    Santhosh
    Edited by: Santhosh on Oct 23, 2012 2:45 AM

    Chancal,
    not always,
    SQL> desc temp;
    Name                                                                                                      Null?    Type
    EMPNO                                                                                                              NUMBER(4)
    ENAME                                                                                                              VARCHAR2(10)
    JOB                                                                                                                VARCHAR2(9)
    MGR                                                                                                                NUMBER(4)
    HIREDATE                                                                                                           DATE
    SAL                                                                                                                NUMBER(7,2)
    COMM                                                                                                               NUMBER(7,2)
    DEPTNO                                                                                                             NUMBER(2)
    SQL> select empno from temp;
         EMPNO
          7369
          7499
          7521
          7566
          7654
          7698
          7782
          7788
          7839
          7844
          7876
          7900
          7902
          7934
          1057
    15 rows selected.
    SQL> select * from table(dbms_xplan.display_cursor);
    PLAN_TABLE_OUTPUT
    SQL_ID  3qt0w20pqj162, child number 0
    select empno from temp
    Plan hash value: 3800668828
    | Id  | Operation         | Name | Rows  | Bytes | Cost (%CPU)| Time     |
    |   0 | SELECT STATEMENT  |      |       |       |     2 (100)|          |
    |   1 |  TABLE ACCESS FULL| TEMP |    15 |    60 |     2   (0)| 00:00:01 |
    13 rows selected.
    SQL> alter table temp modify(empno not null);
    Table altered.
    SQL> select empno from temp;
         EMPNO
          1057
          7369
          7499
          7521
          7566
          7654
          7698
          7782
          7788
          7839
          7844
          7876
          7900
          7902
          7934
    15 rows selected.
    SQL> select * from table(dbms_xplan.display_cursor);
    PLAN_TABLE_OUTPUT
    SQL_ID  3qt0w20pqj162, child number 0
    select empno from temp
    Plan hash value: 472861760
    | Id  | Operation        | Name     | Rows  | Bytes | Cost (%CPU)| Time     |
    |   0 | SELECT STATEMENT |          |       |       |     1 (100)|          |
    |   1 |  INDEX FULL SCAN | IDX_TEMP |    15 |    60 |     1   (0)| 00:00:01 |
    13 rows selected.

  • Need to know the base tables for the QM datasources

    Hello SAP Experts,
    I want to know the base tables for the below mentioned datasources which stores the transaction data.
    1. 2LIS_05_QE1:  Inspection Characterstics Results
    2. 2LIS_05_QE2: Inspection Characterstics Results (Quan)
    3. 2LIS_05_QVUDN: Usage decision for Inspection
    Need your inputs.
    Thanks,
    Lasya.
    Edited by: lasya john on Dec 10, 2008 8:28 PM

    Hi Lasya,
    You can use help.sap.com for this.
    If you do not find this data source there...then
    You can go to LBWE t-code in R/3 and then infront of the data source...you have maintenance option.
    Click on that ...and go inside it in the display mode.
    Here you can see a generic pool of fields on the left side which can be included in the data source........  field present in the data sources in the right side of the pool.
    For every field you have a tructure name infront of it like MCXXXX where XXXX is the table name.
    So the field is being from that particular table.
    Even I would the same thing to reply to your thread.
    You can follow the same procedure to find the table for any LO data source.
    This is accurate in 99% cases...only in very few cases like purchasing...we get one or two fields from different tables.
    Hope it helps.
    Thanks
    Ajeet

  • Problems when trying to replace the base table of an own Business Object

    Dear experts,
    some time ago we created two own (not inherited) Business Ojects for use
    in workflow scenarios. Now we came into the situation that for organizational
    reasons we wanted to exchange the base tables of both the objects.
    The fields and keys in the new tables are all the same than in the old ones,
    basically just the table names have changed.
    The frustrating result of trying to do so are two inconsitent Business objects
    that cannot be activated/generated any more with several errors that I cannot
    get rid off.
    Does anybody have experience with this kind of change in a BO ?
    Am I trying that in vain ? Do I have to create them both entirely new?
    Please help.
    Thanks in advance
    Andreas Flügel

    Hi Mike,
    thanks for the prompt answer.
    The first error is a syntax error concerning the unexpected end of a statement
    with "LIKE". It occurred in the following generated sourcecode-section after
    the generation and  it is generated this way again and again (I already tried
    to complete it manually according to the way it was before):
    BEGIN_DATA OBJECT. " Do not change.. DATA is generated
    " end of private,
      BEGIN OF KEY,
          JOURNALNUMBER LIKE /HOAG/P_DATJOURN-JOURNALNR,
      END OF KEY,
          _ LIKE.
    END_DATA OBJECT. " Do not change.. DATA is generated
    The second error points to the table name in the statement
    get_table_property /hoag/p_datjourn.
    saying "The table name /hoag/p_datjourn is implemented but not defined".
    The third error comes up with a popup (again and again and again) saying
    "The table is not implemented yet. Do you want a sourcecode sample to be
    created for the missing part?". I've alread answered that with "Yes" for a
    couple of times without anything being changed.
    Thanks
    Andreas
    P.S.: the messages may actually read a bit different in english because I just
    translated them myself from german but I hope you know them well enough to
    know what the system wants from me.

  • Create a materized view without primary key constraint on the base table?

    Hi
    I tried to create a materized view but I got this error:
    SQL> CREATE MATERIALIZED VIEW TABLE1_MV REFRESH FAST
    START WITH
    to_date('04-25-2009 03:00:13','MM-dd-yyyy hh24:mi:ss')
    NEXT
    sysdate + 1
    AS
    select * from TABLE1@remote_db
    SQL> /
    CREATE MATERIALIZED VIEW TABLE1_MV REFRESH FAST
    ERROR at line 1:
    ORA-12014: table 'TABLE1' does not contain a primary key constraint.
    TABLE1 in remote_db doesn't have a primary key constraint. Is there anyway that I can create a materized view on a base table which doesn't have a primary key constraint?
    Thanks
    Liz

    Hi,
    Thanks for your helpful info. I created a materialized view in the source db with rowid:
    SQL> CREATE MATERIALIZED VIEW log on TABLE1 with rowid;
    Materialized view log created.
    Then I created a MV on the target DB:
    CREATE MATERIALIZED VIEW my_schema.TABLE1_MV
    REFRESH FAST
    with rowid
    START WITH
    to_date('04-25-2009 03:00:13','MM-dd-yyyy hh24:mi:ss')
    NEXT
    sysdate + 1
    AS
    select * from TABLE1@remote_db
    SQL> /
    CREATE MATERIALIZED VIEW my_schema.TABLE1_MV
    ERROR at line 1:
    ORA-12018: following error encountered during code generation for
    "my_schema"."TABLE1_MV"
    ORA-00942: table or view does not exist
    TABLE1 exists in remote_db:
    SQL> select count(*) from TABLE1@remote_db;
    COUNT(*)
    9034459
    Any clue what is wrong?
    Thanks
    Liz

Maybe you are looking for

  • How to transport a deleted query?

    I have deleted one query in developmeny system. I thought it will ask for tranport request.But it did not ask for any transport requast.Now it is deleted from development system.Please let me know how to transport this change in production?

  • How do I restore old 32GB 4s backup to new 16 GB 5s?

    My old iPhone 32G 4s' screen quit working. I managed to get my old 4s backed up (this was no easy feat as iTunes expected me to respond to a prompt on my phone that I could not see). Then, I traded up to a new 5s.  On my first iTunes sync with my new

  • Is batch automation possible in lightroom?

    I'm converting about 800 pictures from color to black and white for a bible study that will be printed . Ive tried several ways of converting using modes and techniques I found on other sites in photoshop but wasnt happy with results. These pictures

  • I cannot quit the icon for mail. It stays on and because of that, I cannot shut down the computer?

    I cannot quit mail, the icon stays on and if I try to shut down the computer, the window appears and tell me to quit mail first and then shut down the computer. How do I get to quit the mail?

  • Get Latest Version extremely slow

    Hello, When we do a "Get Latest Version" for a project containing about 450 subfolders this operation shows the "Contacting server to get list of items to update..." for a very long time. Eventually it will come up with an error "HTTP code 500: Inter