Query to find dependency of an oracle VIEW

Hi,
I'm using oracle 10g database.
DB name is - ORCL
ORCL DB consists two schemas - Schema1 and Schema2
I have one Oracle view called VIEW1 in Schema1.
I need to find whether Schema2 uses VIEW1 in any of the Tables,views or Programs owned by Schema2.
Is there any query available to find this one?
Regards,
Karthik

How about querying the dba_dependencies view?
SQL> conn / as sysdba
Connected.
SQL> conn aman/aman
Connected.
SQL> create table t as select * from scott.dept;
Table created.
SQL> create view v1 as select * from t;
View created.
SQL> grant select on v1 to scott;
Grant succeeded.
SQL> conn scott/tiger
Connected.
SQL> create view v_dependant as select * from aman.v1;
View created.
SQL> conn / as sysdba
Connected.
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)
SQL> select owner, name , type from dba_dependencies where name='V1' and owner='AMAN';
OWNER                          NAME                           TYPE
AMAN                           V1                             VIEW
SQL> select owner, name , type, REFERENCED_OWNER, REFERENCED_NAME from dba_dependencies where name='V1' and owner='AMAN';
OWNER                          NAME                           TYPE
REFERENCED_OWNER
REFERENCED_NAME
AMAN                           V1                             VIEW
AMAN
THTH
Aman....

Similar Messages

  • Query to find dependent task attached to task on some response in OIM 11g

    can anyone help me in making a sql query to find dependent task attached to task on some response in OIM 11g
    Edited by: user13331347 on Sep 3, 2012 2:09 PM

    Use below query to find all dependent task in OIM 11g:-
    select pkg.pkg_name, mil.mil_name, rsc.rsc_data, rsc.sta_key, sta.sta_status, sta.sta_bucket, mil2.mil_name
    from     pkg pkg, tos tos, mil mil, mil mil2, rsc rsc, sta sta, rgm rgm
    where     pkg.pkg_key = tos.pkg_key
    and tos.tos_key = mil.tos_key
    and mil.mil_key = rsc.mil_key
    and rsc.sta_key = sta.sta_key
    and rgm.rsc_key = rsc.rsc_key
    and rgm.mil_key = mil2.mil_key
    order by pkg.pkg_name, mil.mil_name, rsc.rsc_data, sta.sta_status, mil2.mil_name

  • 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 (+)

  • Query to find biggest table in oracle ERP database?

    Hi
    I would like to see the biggest table in Oracle ERP database, can anybody provide me the query?
    Thanks
    Ateeq

    Hi
    Thanks. Actually, last week all of a sudden 1GB growth of database happen in one day. In our Oracle ERP instance, every user is attaching many documents to purchase orders. So our management is interested to know which table or file system directory is having this much of growth? We want to restrict the users for not uploading every document with purchase order as it will fill-up our server hard disk soon.
    Regards
    Ateeq

  • Find Cube Mappings from Dictionary View

    How can I find the mappings between the columns in fact table and cube?
    I'm needing to find the column name in the cube view that a column in the fact table is mapped to.
    Obviously this is held and it is displayed in the Mappings window in AWM - but how to query to find it?
    The Oracle OLAP User Guide helpfully lists related views here: http://docs.oracle.com/cd/E11882_01/olap.112/e17123/query.htm#OLAUG9186
    But none of these satisfy this requirement as far as I can see.
    So can this be done?
    thanks
    Jim

    You can query all_cube_mappings if you are using 12c Version of the Database
    For 11.2 the only way to do this is to to export the XML for the Cube using DBMS_CUBE.EXPORT_XML see DBMS_CUBE
    The Cube Mappings are in the <CubeMap> tag

  • Query to find the Views and synonyms that are accessing through db_link

    HI all,
    Oracle 10g
    I need a Query to find the Views and synonyms that are accessing through db_link.
    ie.
    database A have the db_link to database B through a schema A
    now i need to find what are the Synonyms and views that are accessing through db_link either directly or indirectly..
    regards,
    Deepak
    Edited by: Deepak_DBA on Dec 10, 2010 5:38 PM

    On the second database (B) use this query to find the SQL which used by the schema A (DB LINK USER). Check the SQL_FULLTEXT column.
    select sql_fulltext,sql_id,module,parsing_schema_name,parsing_user_id,first_load_time,loads,users_executing,rows_processed,plsql_exec_time,sorts,fetches,invalidations,parse_calls,cpu_time,elapsed_time,disk_reads,buffer_gets
    from V$sqlarea
    where parsing_schema_name = 'A' --and to_char(first_load_time,'dd/mm/yyyy') like  '%11/08/2007'
    order by first_load_time desc;
    Regards
    Asif Kabir

  • Query to find all the view name and their size in GB

    Hi,
    What is the query to find all the view name and their size in GB.I am aware of joining all_views and user_segments but this is not serving the purpose.is there any table i need to join to get the desired result
    Thanks

    You could of course be thinking of views as they are stored in other RDBMS' as some of them actually create the view as a table on the database with a copy of the data in it and maintain that data as the base tables are updated.
    As already mentioned, Oracle just stores the SQL of the View and executes that SQL when the view is queried.
    Alternatively, Oracle also has "materialized views" which are created as snapshots of the data and will have a size. This data is updated (refreshed) based on the parameters used when creating the materialized view which means that it will either be, commonly, when a commit is issued or when a refresh is explicitly requested (refresh on demand).

  • Access Query to Oracle View Tool

    We have a Access Database which creates forms and reports. It has lots of queries. we want the similar funtionalities in Oracle. Is there any tool that will convert these access queries to Oracle views. I used Migration workbench to convert the database but it can't convert the query.

    FYI,
    Microsoft Access is using ANSI SQL. And Oracle has introduced ANSI SQL from Oracle 9i so, it is also in 10g.
    Oracle 10g does not stop backward compatibilty so, It is depends on person. And I am not forcing you to migrate query from ACCESS to Oracle. I have simply answer the question which you have asked. Whether you want to perform efficiently or not it's your choice.
    But one thing is sure, ORACLE (9i or 10g) provides ANSI SQL and MS ACCESS is using ANSI sql so, this task is feasible. No doubt about it.

  • Query to find the memory of database in oracle,sql

    Hi All,
    Please let me know the query to find the memory of database in oracle,sql.
    Thanks,
    sajith

    How do I find the overall database size?
    The biggest portion of a database's size comes from the datafiles. To find out how many megabytes are allocated to ALL datafiles:
    select sum(bytes)/1024/1024 "Meg" from dba_data_files;
    To get the size of all TEMP files:
    select nvl(sum(bytes),0)/1024/1024 "Meg" from dba_temp_files;
    To get the size of the on-line redo-logs:
    select sum(bytes)/1024/1024 "Meg" from sys.v_$log;
    Putting it all together into a single query:
    select a.data_size+b.temp_size+c.redo_size "total_size"
    from ( select sum(bytes) data_size
    from dba_data_files ) a,
    ( select nvl(sum(bytes),0) temp_size
    from dba_temp_files ) b,
    ( select sum(bytes) redo_size
    from sys.v_$log ) c;
    Another query ("Free space" reports data files free space):
    col "Database Size" format a20
    col "Free space" format a20
    select round(sum(used.bytes) / 1024 / 1024 ) || ' MB' "Database Size"
    , round(free.p / 1024 / 1024) || ' MB' "Free space"
    from (select bytes from v$datafile
    union all
    select bytes from v$tempfile
    union all
    select bytes from v$log) used
    , (select sum(bytes) as p from dba_free_space) free
    group by free.p
    This is what I use :P From http://www.orafaq.com/wiki/Oracle_database_FAQ#How_do_I_find_the_overall_database_size.3F

  • Query to find out controls displayed as in UI for an applet,along with view

    Hi,
    I am looking for a query to find out list of all the controls as displayed in UI applet along with applet's view.
    Please note that in the query only mapped controls (those displayed in UI ) should come up.
    Regards,
    Kunal

    Hi,
    If the EUL is an apps mode (EBS) EUL then the eu_username column is the apps user id or apps resp id. If you want to show only the responsibilities and convert those ids to names then you need to use the EUL5_GET_APPS_USERRESP function like this:
    select ba_name, ba_developer_key, EUL5_GET_APPS_USERRESP(eu.eu_username, 'R') responsibility_name
    from eul5_bas ba
       , eul5_access_privs ap
       , eul5_eul_users eu
    where ba.ba_id = ap.gba_ba_id
    and ap.ap_type = 'GBA'
    and ap.ap_eu_id = eu.eu_id
    and eu.eu_role_flag=1
    order by 1,2,3Rod West

  • ORACLE E-BUSINESS SUITE 11i Query to find users who never logged in

    Dear, All -
    ORACLE E-BUSINESS SUITE 11i
    Is there a query to find out a list of users who were created but never logged into the system. I believe these users do no appear in FND_USER table since they never logged in.
    Thanks in advance!

    FAIRE wrote:
    Dear, All -
    ORACLE E-BUSINESS SUITE 11i
    Is there a query to find out a list of users who were created but never logged into the system. I believe these users do no appear in FND_USER table since they never logged in.
    Thanks in advance!All application users details are stored in FND_USER table (whether they logged in or not).
    To find the list of those users, please run this query:
    SQL> select *
    from FND_USER
    where LAST_LOGON_DATE is NULL
    and END_DATE is NULL;Thanks,
    Hussein

  • Query to find out tables using view

    Hi
    I have a views using three tables.Now i wanted a query to find out number of views using three tables
    I have written a query
    select * from dba_views where text like '%SELECT%;
    It is giving me error as ora error EXPECTED NUMBER GOT LONG.
    Appreciate your help?

    SELECT DECODE(referenced_type, 'NON-EXISTENT', '.....',
    referenced_type) || ' ' || referenced_owner ||
    '.' || referenced_name r_name, ' is referenced by: ' ||
    type || ' ' || owner || '.' || name name,
    ' Referenced Link: ' || DECODE(referenced_link_name,
    NULL, 'none', referenced_link_name) r_link
    FROM dba_dependencies
    -- WHERE owner NOT IN ('SYS', 'SYSTEM')
    -- and rownum < 50
    ORDER BY 1,2;
    add your own where clause to it

  • "Can't find dependent libraries" Query

    I created a sample.dll using VC++ which inturn uses java libraries. I
    was getting 'file.obj : error LNK2001: unresolved external symbol
    __imp__JAWT_GetAWT@8' link error while creating sample.dll even after
    providing jawt.dll path. So used jre/lib/jawt.lib to create the
    sample.dll. I am using this sample.dll to run a java program. While
    running the java program, I am getting the error 'Exception in thread
    "main" ava.lang.UnsatisfiedLinkError: sample.dll: Can't find dependent
    libraries'. If I don't use jawt.lib (by commenting relevant code) to
    create sample.dll, my java program runs fine.
    But I need to use the code relevant to jawt.lib. Any idea how to over
    come Can't find dependent libraries error?

    You need to link against "jawt.lib"
    E.g.
    In VC++ goto
    Projects -> Settings ->Link Tab
    Add jawt.lib to the Object/Library modules and Project Options.

  • Query for finding Oracle CPU and memory utilization and

    I want to gather the report using Oracle views in the same formatas of the report which the top utility gives for Sun-Solaris OS processes.
    I want the same type of report for Orcale database processes including all the user processes and the oracle internal processes.
    can any body tell me if it is possible.
    I am writing the top utility report format below and its contents:
    CPU-processor number
    TTY-Terminal interfaces used
    PID-Process id number
    USERNAME-Name of the owner of the process
    PRI- Current priority of the process
    NI- Nice value
    SIZE- total size of process (text+data+stack)
    RES-resident size of process
    STATE- current state of process
    TIME-number of system and CPU seconds the process has consumed
    %WCPU-weighted CPU
    %CPU-raw CPU
    COMMAND- name of the command
    thanks in advance

    See this thread Re: Oracle Shared DB instance utilization

  • Query to find the list of workbooks and worksheets assiciated to those book

    Hi Gurus,
    Could you help me with the tables / Query to fetch the list of workbooks and associated worksheets names as welll.
    Thanks in advance!!
    Rgds,
    Santosh

    Hi Santosh
    The whole point of the STATS table is to allow you to query performance, who did what and when. The database itself does not keep such statistics so if you disable Discoverer's method of capturing these you have no way of knowing who did what and when.
    Without this it is impossible to say. I would strongly recommend you enable the capturing of statistics.
    The reason you cannot directly query a WORKBOOK to determine what WORKSHEETS are associated with it is because that information is stored as binary information and not in SQL format.
    Discoverer 10g has the capability of providing detailed information on the EUL. This feature is not offered "out of the box" but can be easily enabled.
    The EUL Administrator can enable the feature by completing the following steps (see also MOS Note 556932.1):
    1. Log on to SQL*Plus as the Discoverer Administrator on the machine where Discoverer Administration Edition is installed.
    2. Execute the EUL5.SQL script found in the *$ORACLE_HOME\discoverer\util* directory. (This script will create the necessary database objects.)
    NOTE: If you are using an Oracle Applications mode EUL, you must also run the eul5_apps.sql file in the $ORACLE_HOME\discoverer\util directory.   This script must be run as the EUL owner, and not the Oracle Applications SYSADMIN user.
    4. Exit SQL*Plus and log on to the Discoverer Administration Edition product (as the EUL Administrator).
    5. From the menu bar, select File | Import.
    6. Import the EUL5.EEX file from the ORACLE_HOME\discoverer directory. Once the EUL import is complete, a new business area will be created and visible called The Discoverer V5 EUL. This is the business area that provides the details on the EUL.
    EUL Management Workbooks for Discoverer Administrators
    The EUL5.EEX file also imports four pre-built Discoverer workbooks. These workbooks are automatically saved to the database during the EEX import and can be executed in Discoverer Plus, Viewer or Desktop:
    EUL Workbook Management - shows which workbooks are shared with which users. Examine worksheets to find the folders, items, joins and conditions they depend upon.
    EUL Access - This Workbook indicates if a current EUL exists in this users schema. It also displays the EUL's in other user schemas that this user can access.
    EUL Query Statistics - Find out which workbooks and worksheets are being used by whom. Examine users ad-hoc queries.
    Lineage - Hyper Drill from Discoverer to find a folder or Items Lineage in Oracle Warehouse Builder. To enable the Hyper drill, you will first need to run the Lineage.sql script.
    The Discoverer Administrator can use the pre-built workbooks or build their own EUL management workbooks by using the Discoverer V5 EUL business area.
    Best wishes
    Michael

Maybe you are looking for

  • Lightroom 5 is distorting my images in Develop view

    When working on images in Develop, Lightroom 5 is distorting them. For example, let's say I'm looking at an image in Library view (fig.1), then switch to Develop view (fig.2) - the image is suddenly compressed horizontally (or stretched vertically, h

  • Photo's no longer sync by title in iTunes 11.3.1

    Hello, Since upgrading to iTunes 11.3.1 my photos will no longer sync to my iPad or iPod by title, it is syncing by date which I do not want. Time machine will not allow me to go to the previous version of iTunes. I get a message indicating iTunes is

  • Move out Info Provider to other server without transport connection?

    Hi All, Could you share you thought ? Is there a possibility to move out the info provider design & info object to other server without transport connection ? The background is our project box will be decommissioned, and unfortunately it's not connec

  • Adding events in my phone gives wrong time on my computer.

    when I add an event to calendar in my iphone it pushes to ical in my computer an 1hr. later and when I put an event into my ical on my computer it pushes to my iphone an 1hr earlier. any help, my computer's clock is set to my time zone and my iphone

  • Adobe Javascript

    I need some help in writing a Javascript macro. We create many PDF documents from Word by applying the Save as PDF option. We then open each PDF document and edit its file properties. In the Description tab, we update the Title and Author and in the