View created on which table in oracle

Hi,
How can we get the information that view is created for which table.
Please suggest

SQL> desc dba_dependencies
Name                            Null?    Type
OWNER                            NOT NULL VARCHAR2(30)
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)
DEPENDENCY_TYPE                        VARCHAR2(4)query against view above

Similar Messages

  • How to find the views created on a table..?

    Hi all,
    I am having one table name, EMP. I want to know what are the views created on this table. Is there any SQL query is there for this or any another
    way to find it.
    Thanks in advance.
    Pal

    You can use ALL_DEPENDENCIES for that:
    SQL> create view emp_v as select * from emp;
    View created.
    SQL> select name
      2  ,      referenced_name
      3  ,      referenced_type
      4  from   all_dependencies
      5  where  name = 'EMP_V';
    NAME                           REFERENCED_NAME                                                  REFERENCED_TYPE
    EMP_V                          EMP                                                              TABLE
    1 row selected.
    SQL> select name
      2  ,      referenced_name
      3  ,      referenced_type
      4  from   all_dependencies
      5  where referenced_name = 'EMP';
    NAME                           REFERENCED_NAME                                                  REFERENCED_TYPE
    EMP_V                          EMP                                                              TABLE
    EMP_TRG                        EMP                                                              TABLE
    2 rows selected.
    SQL> Keep in mind that it matters whether you restrict on NAME or on REFERENCED_NAME.
    http://download.oracle.com/docs/cd/B19306_01/server.102/b14237/statviews_1041.htm#sthref935
    edit
    Ah, spoonfeeding!
    Don't you want him to learn something, and to become independent?Now you made me feel guilty ;) ( don't know what Saubhik posted originally, but anyway...)
    I blame my currently terribly slow connection for that...
    Anyway, OP, always start a quick search from the docs first.
    Chances are you'll find your answer yourself.
    Homes:
    http://www.oracle.com/pls/db102/homepage
    http://www.oracle.com/pls/db112/homepage
    Edited by: hoek on Oct 15, 2010 2:53 PM

  • Query on Materialized View created on Prebuilt Table

    Hi,
    I am trying to explain the scenario below on Materialized View which I want to setup for our database.
    I have created a materialized view on prebuilt table on target side on primary key. Now for purging history data from target side which are more than 5 years old I have executed the following steps:
    1. Dropped the materialized view which was created previously on prebuilt table in target side.
    2. Deleted the data from that target table which are more than 5 years old.
    3. Now created the materialized view again on the prebuilt table.
    Now, the problem which I am facing is that - if any changes happens in the source side during the above 3 steps on the target side those changed records were not captured even after successfully building materialized view again in the target side (i.e. after completing step-3 of above the intermediate changed records were not captured).
    Can you please let me know exactly what I am doing wrong here and how can I achieve my intended result.
    Regards,
    Koushik

    See matelink for doc id *252246.1*. The document id says: A materialized view was defined on a Table A. This table had a referential constraint defined against another table, Table B. This constraint was defined as 'ON DELETE CASCADE'. An 'ON DELETE CASCADE' constraint is not allowed on views but as the constraint was created on the table underlying the materialized view, Table A, it could be created although it would behave as a constraint on the view. The constraint existed for performance reasons, which is permitted, and was disabled when created but a general script had been run to enable all constraints. When a delete was performed on Table B the error above was reported although there was no view created on Table B.

  • Can we delete the views created for a user in Oracle BPM J2EE WL

    I am using Oracle BPM 10.3 MP2 Enterprise Edition
    Version: 10.3.2
    Build: #100486
    Can we delete the views created for a user in workspace?
    Usually we are using the filter option within workspace and then saving it as view.
    Would like to know if we can delete such views and create again.
    These views are user specifc
    Thanks in Advance.
    -Sree

    I usually use this scripts to clean the workspace user custom seetings:
    delete from fuego_objclassinst where fuego_objclassname = 'bea.albpm.workspace.layout';
    delete from fuego_strprops where (fuego_category = 'fuego-view' OR fuego_category= 'fuego-presentations');
    delete from fuego_strprops where (fuego_category = 'WAM' );
    Hope this help.
    Regards

  • Creating a new table in oracle 10g

    Hi. been out of the business for 8 months. downloaded oracle 10g and now having trouble creating scripts and tables like i did in 9i. Any thing new I need to know about?
    thanks,
    Lorenzo Harris

    Thanks. I got that. My question is the sign on screen is different. i have to type connect to user/password.
    is this the new way or did i not get the old sql screen that ask for user then password:
    thanks,
    Lorenzo

  • VIEW created from two tables

    hi,
    i have created a view between two tables.
    1. i want to know whether will i get the upto date data if i fetch data from the view.?
    2. Does  view fetch data from table every time when it is used or it stores it in buffer or something like that.? If it fetches every time ,then what is the advantage over accessing  tables directly using joins?
    pls help

    Hi Saravanan,
    Views are definitely advantageous. And you can use views over joins.
    But remember that just like joins, views using 3 or more tables can be slightly slow.
    The view doesnt store any data on its own. A view is only a logical join.
    And it does make use of the DB buffers already defined.
    May be, you need to check if you have defined your view correctly. Check your view join conditions.
    Hope this answers ur question. Reward points if it does.
    Rgds,
    Prashanth.
    SAP.

  • How to see the views created on a table

    Dear all,
    Please let me know the procedure to find out "the views created on a perticular table"

    CKPT wrote:
    Did OP mentioned ? :(
    change the query as
    select a.view_name,b.table_name from dba_views a, dba_tables b where a.owner='user1' b.owner='user2' and b.table_name='table' and a.owner='user';simpleWhat is that query supposed to return ?
    <s>It will do a scalar product between DBA_VIEWS and DBA_TABLES returning one single table name for every single view over your db without any link together except they have the same owner. Very useful, very helpful.</s><br>
    I misread the query, it is even worse than I thought, the query will return nothing. Nothing because a.owner cannot be equal to user1 and to user in the same time.
    I think Girish give a much better solution with DBA_DEPENDENCIES.
    Nicolas.
    Edited by: N Gasparotto on Aug 12, 2010 12:48 PM

  • Oracle VIEW created on SAP table

    Hi All,
    I've Oracle 10g. I've a view in it on an SAP table using DB link.
    I started getting error ORA-06502: PL/SQL: numeric or value error: Bulk Bind: Truncated Bind when this view is fetched using FOR loop. On investigation, I found that there is a column which when VIEW is described shows datatype as VARCHAR2(10) but it actually has some records with length more than 10.
    When I modified PL/SQL block and modified this query by adding SUBSTR on the column to get just 10 chars, it worked.
    I suspect that this SAP table might have been recently altered to increase columns length i.e. altered after VIEW was created on it. Here, my question is that will I need to recreate this view? As usually when a view is created on an Oracle table, it automatically inherits table column's data types. even when a table column is altered after view is created.
    Thanks in advance.

    Hi Chintan,
    Why can't you Query the SAP table and checking the length of the column ?
    I think the error is now in the view. I think the problem is with the code. Hope you might
    have declared a variable which does not fit the size of the value you are assigning.
    This may be the cause too when you take the substr function you are not getting errors.
    Can you Please the code ??
    And,
    If I am Clear,
    When you create a view from SAP table, we just issue,
    CREATE OR REPLACE VIEW sp_view
    AS
       SELECT *
         FROM sapprd.marm@sap;And, the view is created based onthe base Table. So the datatype is inherited, for VARCHAR and NUMBER datatype.
    And, the TIMESTAMP in SAP is to VARCHAR2 type in oracle.
    Thanks,
    Shankar

  • Create a External Table in Oracle 10g:== ERROR: KUP-01005

    Hello.
    I have a problem working with external tables, hope someone can help me with this problem. Thanks.
    This is the code of the external table
    ========================
    CREATE TABLE SIAFI.RNP_IDS
    NUMERO_ID VARCHAR2(30 BYTE),
    PRIMER_NOMBRE VARCHAR2(300 BYTE),
    SEGUNDO_NOMBRE VARCHAR2(300 BYTE),
    APELLIDO_PATERNO VARCHAR2(300 BYTE),
    APELLIDO_MATERNO VARCHAR2(300 BYTE),
    DEPARTAMENTO VARCHAR2(300 BYTE),
    CORRELATIVO VARCHAR2(300 BYTE)
    ORGANIZATION EXTERNAL
    ( TYPE ORACLE_LOADER
    DEFAULT DIRECTORY SEG_DIRECTORIO
    ACCESS PARAMETERS
    ( records delimited by NEWLINE
    badfile SEG_DIRECTORIO:'censo.bad'
    logfile SEG_DIRECTORIO:'censo.log'
    FIELDS TERMINATED BY ',' OPTIONALLY ENCLOSED BY '"' and '"'LDRTRIM
    REJECT ROWS WITH ALL NULL FIELDS
    (NUMERO_ID VARCHAR(30) NULLIF NUMERO_ID=BLANKS
    TERMINATED BY "," OPTIONALLY ENCLOSED BY '"' and '"'LDRTRIM,
    PRIMER_NOMBRE VARCHAR(300) NULLIF PRIMER_NOMBRE=BLANKS
    TERMINATED BY "," OPTIONALLY ENCLOSED BY '"' and '"'LDRTRIM,
    SEGUNDO_NOMBRE VARCHAR(300) NULLIF SEGUNDO_NOMBRE=BLANKS
    TERMINATED BY "," OPTIONALLY ENCLOSED BY '"' and '"'LDRTRIM,
    APELLIDO_PATERNO VARCHAR(300) NULLIF APELLIDO_PATERNO=BLANKS
    TERMINATED BY "," OPTIONALLY ENCLOSED BY '"' and '"'LDRTRIM,
    APELLIDO_MATERNO VARCHAR(300) NULLIF APELLIDO_MATERNO=BLANKS
    TERMINATED BY "," OPTIONALLY ENCLOSED BY '"' and '"'LDRTRIM,
    DEPARTAMENTO VARCHAR(300) NULLIF DEPARTAMENTO=BLANKS
    TERMINATED BY "," OPTIONALLY ENCLOSED BY '"' and '"'LDRTRIM,
    CORRELATIVO VARCHAR(300) NULLIF CORRELATIVO=BLANKS
    TERMINATED BY "," OPTIONALLY ENCLOSED BY '"' and '"'LDRTRIM,
    LOCATION (SEG_DIRECTORIO:'censo.txt')
    REJECT LIMIT UNLIMITED
    NOPARALLEL
    NOMONITORING;
    When executing the stament select from RNP_IDS* it returns the following error message:
    ===========================================================
    ORA-29913: error in executing ODCIEXTTABLEOPEN callout
    ORA-29400: data cartridge error
    KUP-00554: error encountered while parsing access parameters
    KUP-01005: syntax error: found "terminated": expecting one of: "and, comma, defaultif, not, nullif, or, )"
    KUP-01007: at line 6 column 56
    ORA-06512: at "SYS.ORACLE_LOADER", line 19
    ORA-06512: at line 1
    This is the example of the file I'm using:
    ==========================
    "0","DOUGLAS","AUGUSTO","ABBOTT","","1","3672097"
    "0101190600010","MARIA","URBANA","GOMEZ","URBINA","2","1949122"
    "0101190600076","ENRIQUETA","","GARCIA","","2","1162025"
    "0101190800106","LUCILA","","FLORES","","2","1658013"

    Hi
    Here we go...
    I reduced the 300 length of varcahr t o30 for testing purpose...
    SQL> CREATE TABLE RNP_IDS
    2 (
    3 NUMERO_ID VARCHAR2(30),
    4 PRIMER_NOMBRE VARCHAR2(30),
    5 SEGUNDO_NOMBRE VARCHAR2(30),
    6 APELLIDO_PATERNO VARCHAR2(30),
    7 APELLIDO_MATERNO VARCHAR2(30),
    8 DEPARTAMENTO VARCHAR2(30),
    9 CORRELATIVO VARCHAR2(30)
    10 )
    11 ORGANIZATION EXTERNAL
    12 ( TYPE ORACLE_LOADER
    13 DEFAULT DIRECTORY LOG
    14 ACCESS PARAMETERS
    15 ( records delimited by NEWLINE
    16 badfile LOG:'censo.bad'
    17 logfile LOg:'censo.log'
    18 FIELDS TERMINATED BY ','
    19 OPTIONALLY ENCLOSED BY '"' and '"'LDRTRIM
    20 REJECT ROWS WITH ALL NULL FIELDS
    21 (
    22 NUMERO_ID ,
    23 PRIMER_NOMBRE ,
    24 SEGUNDO_NOMBRE ,
    25 APELLIDO_PATERNO,
    26 APELLIDO_MATERNO ,
    27 DEPARTAMENTO,
    28 CORRELATIVO
    29 )
    30 )
    31 LOCATION ('sample1.txt')
    32 )
    33 REJECT LIMIT UNLIMITED
    34 NOPARALLEL
    35 NOMONITORING;
    Table created.
    SQL> desc rnp_ids
    Name Null? Type
    NUMERO_ID VARCHAR2(30)
    PRIMER_NOMBRE VARCHAR2(30)
    SEGUNDO_NOMBRE VARCHAR2(30)
    APELLIDO_PATERNO VARCHAR2(30)
    APELLIDO_MATERNO VARCHAR2(30)
    DEPARTAMENTO VARCHAR2(30)
    CORRELATIVO VARCHAR2(30)
    SQL> select numero_id from rnp_ids;
    NUMERO_ID
    0
    0101190600010
    0101190600076
    0101190800106
    - Pavan Kumar N

  • OWB Mapping involving Oracle External Table to  Oracle Target Table.

    Hi All,
    I created a mapping which involves External Table as source & oracle table as target.
    Following were steps followed.
    1> Created Directory & External Table on oracle server
    2> Attached Text file with ',' delimiter to the External Table.
    3> Imported the External Table in source module.
    4> Created mapping which involves External Table as Source & Oracle Table as Target.
    5> Validated & Generated Mapping in OWB.
    6> Deployed the mapping in Deployment Manager.
    7> Executed the mapping in Deployment Manager.
    Execution Results: Completed with errors.
    No error message is displayed, I am wondering where can I get more information about the error message?
    Thanks in Advance.
    Regards,
    Vidyanand

    Hi,
    Look in the logfile <your runtime owner>.log.* under the directory <owb home>/owb/log
    thanks

  • How to create volumes of table

    Now we are going to port a J2EE product to the SAP NetWeaver platform, and our goal is to get certified by SAP.
    The first problem is to create volumes of table in Oracle database which will also the DB for SAP ERP. It is not suitable to use SQL clauses. And it will be lots of work to use SE11(ABAP dictionary).
    Any suggestion? Thanks very much.

    Maybe ask DBA for help

  • Sql table in oracle

    CREATE TABLE [dbo].[LIMS_AMPLES](
         [SUBMISSION_ID] [decimal](10, 0) NOT NULL,
         [SAMPLE_ID] [decimal](10, 0) NOT NULL,
         [DATE_TIME] [datetime] NOT NULL,
         [LAB] [varchar](40) NULL,
         [USER_SAMPLEID] [varchar](40) NULL,
         [STATUS] [varchar](20) NULL,
         [CONDITION] [varchar](20) NULL,
         [COMMENTS] [varchar](40) NULL,
         [DDR] [varchar](40) NULL,
         [HTRT] [varchar](40) NULL,
         [HLOC] [varchar](40) NULL,
         [SPECIFICATIONS] [varchar](40) NULL,
         [CHEM_SAMPLE_TYPE] [varchar](40) NULL,
         [BOX] [varchar](40) NULL,
         [CHLOC] [varchar](20) NULL,
         [CUSTOMER] [varchar](40) NULL,
         [GRD] [varchar](40) NULL,
         [IG] [varchar](40) NULL,
         [MOT] [varchar](40) NULL,
         [PCD] [varchar](40) NULL,
         [DIASIZE] [varchar](40) NULL,
    CONSTRAINT [PK_LIMS_SAMPLES] PRIMARY KEY NONCLUSTERED
    above mentioned is the sql server script when i want create the same table in oracle how will i define the constaraint please help with statement
    thanks

    896398 wrote:
    hI,
    if it is a foreign key then how it suppose to be define
    thanks
    Edited by: 896398 on Mar 4, 2013 9:41 PM=================================================
    Learning how to look things up in the documentation is time well spent investing in your career. To that end, you should drop everything else you are doing and do the following:
    Go to tahiti.oracle.com.
    Drill down to your product and version.
    <b><i><u>BOOKMARK THAT LOCATION</u></i></b>
    Spend a few minutes just getting familiar with what is available here. Take special note of the "books" and "search" tabs. Under the "books" tab you will find the complete documentation library.
    Spend a few minutes just getting familiar with what <b><i><u>kind</u></i></b> of documentation is available there by simply browsing the titles under the "Books" tab.
    Open the Reference Manual and spend a few minutes looking through the table of contents to get familiar with what <b><i><u>kind</u></i></b> of information is available there.
    Do the same with the SQL Reference Manual. The answer to your current questions is found in this manual.
    Do the same with the Utilities manual.
    You don't have to read the above in depth. They are <b><i><u>reference</b></i></u> manuals. Just get familiar with <b><i><u>what</b></i></u> is there to <b><i><u>be</b></i></u> referenced. Ninety percent of the questions asked on this forum can be answered in less than 5 minutes by simply searching one of the above manuals.
    Then set yourself a plan to dig deeper.
    - Read a chapter a day from the Concepts Manual.
    - Take a look in your alert log. One of the first things listed at startup is the initialization parms with non-default values. Read up on each one of them (listed in your alert log) in the Reference Manual.
    - Take a look at your listener.ora, tnsnames.ora, and sqlnet.ora files. Go to the Network Administrators manual and read up on everything you see in those files.
    - When you have finished reading the Concepts Manual, do it again.
    Give a man a fish and he eats for a day. Teach a man to fish and he eats for a lifetime.
    =================================

  • Creating my first table

    Hi Guys,
    I'm having a really basic problem when creating my first table using Oracle Enterprise Manager (11g)
    What I've done is:
    1. Log into Enterprise Manager 11g using sys as SYSDBA
    2. Created a tablespace called APPLICATIONS
    3. Created a user account called SAMPLEAPPLICATION and set its default tablespace to APPLICATIONS
    4. Then, without logging out, I've tried to create a new table in the SAMPLEAPPLICATION schema and using the APPLICATIONS tablespace
    But unfortunately I'm getting an error message saying something like "Failed to commit: ORA-01950: no privileges on tablespace 'APPLICATIONS' "
    The thing I'm not understanding is why the sys user would not be able to create a table on the APPLICATIONS tablespace.
    Is the sys user specifically not allowed to do these things because you're not supposed to do these sorts of mundane operations with that account, or is perhaps something else going on?
    Many thanks to anyone who can advise
    Simon

    yep,
    What I have found is when creating a table even logged in as SYS even logged in as sys if you try and create a table as another user that user needs permission and quota to own the object.
    as an example
    logged in as sys
    SQL> create user myschema identified by temp ;
    SQL> grant create session to my schema ;
    SQL> grant create table to my schema ;
    SQL> create table myschema.mytable (x varchar2(20), z varchar2(20)) tablespace users ;
    create table myschema.mytable (x varchar2(20), z varchar2(20)) tablespace users
    ERROR at line 1:
    ORA-01950: no privileges on tablespace 'USERS'
    SQL> alter user myschema quota unlimited on users ;
    User altered.
    SQL> create table myschema.mytable (x varchar2(20), z varchar2(20)) tablespace users ;
    Table created.
    SQL>

  • "Create Data Warehouse Tables"  doesn't create any tables ?

    We are attempting to install and configure OBIA 7.9.6 for Peoplesoft 8.9. The steps to install and configure Informtica and DAC and their respective repositories are completed. However, Step 4.12 to Create Data Warehouse Tables on Oracle database, although apparently successful (returns no error) does not create any tables or other objects in the datawarehouse schema. Apparently, "oracle_bi_dw.ctl" is being generated with NO DDL definitions only a two line header to the effect
    [DDL File]
    Version = 1Has anyone encountered a similar issue and resolved it ? (We have an SR open with Oracle Support).
    NOTE : ddlimp does connect succesfully to the database -- I created a Database ON LOGON trigger to catch and trace logons by the datawarehouse schema.
    Hemant K Chitale
    Edited by: Hemant K Chitale on Nov 20, 2009 11:54 AM

    Closing this thread.
    A Reinstall worked.

  • How to CREATE VIEW to merge two tables each of which has CLOB-typed column

    I failed in creating a view to merge two tables that have CLOB-type column each.
    The details are:
    Database: Oracle 9i (9.2.0)
    Two tables "test" and "test_bak", each of which has the following structure:
    ID Number(10, 0)
    DUMMY VARCHAR2(20)
    DUMMYCLOB CLOB
    The following operation fails:
    create view dummyview (id, dummy, dummyclob) as
    select id, dummy, dummyclob from test
    union
    select id, dummy, dummyclob from test_bak;
    I was announced:
    select test.id, test.dummy, test.dummyclob
    ERROR in line 2:
    ORA-00932: inconsistent data type: required - , but CLOB presented.
    But if creating views from only ONE table with CLOB-type columns, or from two tables WITHOUT CLOB-typed columns, the creation will succeed. The following 1) and 2) will succeed, both:
    1) one table, with CLOB-typed column
    create view dummyview (id, dummy, dummyclob) as
    select id, dummy, dummyclob from test;
    2) two tables, without CLOB-typed columns
    create view dummyview (id, dummy) as
    select id, dummy from test
    union
    select id, dummy from test_bak;
    I want to merge the two tables all, with complete columns, how to write the CREATE VIEW SQL statement?
    many thanks in advance

    Dong Wenyu,
    No.
    But you could do this:
    SELECT source.*, nvl (tab1.clob_column, tab2.clob_column)
    FROM your_table1 tab1, your_table2 tab2, (
    SELECT primary_key, ...
    FROM your_table1
    UNION
    SELECT primary_key, ...
    FROM your_table2
    ) source
    WHERE source.primary_key = tab1.id (+)
    AND source.primary_key = tab2.id (+)
    In other words, do the set operation (UNION (ALL)/INTERSECT/MINUS) on just the PK columns before pulling in the LOB columns.
    d.

Maybe you are looking for