How to find objects ( tables) used in SP

Is there any query with which I can find all the tables used ( to perform Select Insert Update Delete operation) in a procedure in oracle 10g.
I want to take back up of all the tables used in a particular. but it is becoming difficult to find by looking at line by line as the sp is of 3K + lines.

With USER_DEPENDENCIES view :
SELECT referenced_owner, referenced_name
FROM user_dependencies
WHERE type = 'PROCEDURE'
AND name = 'YOUR_SP_NAME'
AND referenced_type = 'TABLE'
;

Similar Messages

  • How to find object dependencies using the DBA_DEPENDENCIES

    Hi,
    Could some one please help me in finding out the object dependencies among objects?
    I was trying to find out the all levels of dependencies for a given object in  a given schema, but this following query is not working for packages type.
    I want to find out all LEVELS of object involved in the creation of a package.
    Example:
    SELECT DISTINCT owner,name,referenced_owner,referenced_name,referenced_type, LEVEL Le1
    FROM dba_dependencies
    where owner =user
    START WITH NAME = 'object name'
    CONNECT BY NOCYCLE PRIOR referenced_name    = NAME
    --AND PRIOR REFERENCED_OWNER = OWNER
    --AND REFERENCED_TYPE = 'PACKAGE'
    ORDER SIBLINGS BY name
    Please help.

    Oracle Database 11g Enterprise Edition Release 11.2.0.2.0 - 64bit Production
    WITH v AS (
        SELECT  line
               ,col
               ,name
               ,object_type
               ,object_name
               ,type
               ,usage
               ,usage_id
               ,usage_context_id
        FROM    user_identifiers
        WHERE   object_name = 'XML_SPREADSHEET'
        AND     object_type = 'PACKAGE'
    SELECT  LEVEL,LPAD(' ', 2*(LEVEL-1)) ||NAME
           ,object_type
           ,type
           ,usage
           ,line
    FROM v
    START WITH name = 'T_REC_CAPTION'
    CONNECT BY PRIOR usage_id = usage_context_id
    ORDER SIBLINGS BY line, col
         LEVEL LPAD('',2*(LEVEL-1))||NAME   OBJECT_TYPE   TYPE               USAGE             LINE
             1 T_REC_CAPTION                PACKAGE       RECORD             DECLARATION        317
             2   TITLE                      PACKAGE       VARIABLE           DECLARATION        318
             3     VARCHAR2                 PACKAGE       CHARACTER DATATYPE REFERENCE          318
             2   TOPTITLE                   PACKAGE       VARIABLE           DECLARATION        319
             3     VARCHAR2                 PACKAGE       CHARACTER DATATYPE REFERENCE          319
             2   SPAN                       PACKAGE       VARIABLE           DECLARATION        320
             3     PLS_INTEGER              PACKAGE       SUBTYPE            REFERENCE          320
             2   COMMENT                    PACKAGE       VARIABLE           DECLARATION        321
             3     VARCHAR2                 PACKAGE       CHARACTER DATATYPE REFERENCE          321
             2   REPEATTITLE                PACKAGE       VARIABLE           DECLARATION        322
             3     BOOLEAN                  PACKAGE       BOOLEAN DATATYPE   REFERENCE          322
             1 T_REC_CAPTION                PACKAGE       RECORD             REFERENCE          324
             2   BINARY_INTEGER             PACKAGE       SUBTYPE            REFERENCE          325
    13 Zeilen gewählt
    What do you mean with They are giving only one level depth of dependencies?

  • How to find which table is not being used ?

    Hi,
    I am in need of releasing space from the common schema we have. i have been permitted to drop the tables which has not been used for the last three months.
    Can anyone please suggest how to find the tables that has not been used for a given amount of time.
    Thanks and Regards.
    Rajib

    i have been permitted to drop the tables which has not been used for the last three months.Can I just chip in an observation on this premise? It's not unusual for systems to have processes that run quarterly or even annually. You need to be very careful about dropping "unused" tables - you might just kill your organisations end of year reporting system.
    Is buying more disk space really not an option?
    Cheers, APC

  • How to find Port numbers used by RMI application

    Hi, hope u all find me a solution, how to find port numbers used in the RMI application, that is port number which the RMI application communicates between RMIserver and RMIclient. ur answers would b highly appreciated

    Currently RMI transport layer does not directly expose any public methods to get the listening ports of the exported RMI objects, but the application can always export RMI server objects at certain designated ports instead of relying on the RMI runtime by specifying them to UnicastRemoteObjcect at the time of exporting.
    RMI transport layer try to optimize the number of listeing sockets by exporting all RMI server objects on a single port if no explicit ports were chosen. If the application is really interested in knowing the listeing ports, it can always specify the client and server socket factories to be used for creating Socket and ServerSocket to the RMI runtime at the time of exporting. When a RMI server object is exported, but the listening socket is not yet created, RMI transport layer invokes the createServerSocket(host, port) of server socket factory by passing the host and port details. If no explicit port is specified, underlying socket implementation choses anonymous port. At this point of time application can log these listeing ports to some log file.
    Similarly when the stub to the remote object is de-serialized in the client address space, it does also contain the client socket factory along with the end point details (host, port and server object ID). RMI runtime in the client address space needs to establish connection with the remote server object, it try to get the socket from client socket factory by invoking createSocket() on the client socket factory. Now the application can call getLocalPort() on the socket before returning it to the RMI transport layer.
    There is a undocumented class RMIStat to dump RMI runtime state information. It provides a lot of static methods to dump RMI state information like object table, transports, threads etc. You can download the source code of this utility from RMI archives, but remember this is not a comman-line utility, you must invoke these static methods as part of the application code.
    -- Srinath Mandalapu

  • How to find out table name for the field in the webUI

    Hi.
    I am in CRM2007.
    So i go to the transaction code    BSP_WD_CMPWB
    In that i provide the component name as CRM_UI_FRAME.
    I press the Test button.
    So, it opend the WebUI.
    I want how to find out table of the particular input field?
    I mean from which table the data is retrived how to find out?
    When i enter some thing in the input field how to find out in which table that data is stored?
    By pressing F2 on the input field it opend View and Component Name.
    I want find out table of that particular field. How to find it?
    If anybody know about this explain it with Screen shorts if possible.
    Thank You.
    Krishna. B.

    hi
    goto tx genil_model_browser. Suppose you want to find fields reated to your order header eg sold to name. In component set write all and press F8. Then goto access object and in access object click on node BTAdminH. Click on attribute structure. Here you will find structure and attributes. If you click relationship then you will see all the relationship wrt btadminh. open any r/s that you require. and click on other object and attribute. You will get to know the structure.
    Best regards
    Pankaj kumar

  • Find all tables used in a stored procedure

    Hi,
    I have a requirement where i have to find all the tables used in a stored procedures from different  databases.
    Ex: i have a stored procedure where i use few tables from MASTER database and some from STAGE database.When i have written a query to find all tables used in the stored procedure, i am getting only those database table where i run the query and procedure
    exists.
    I have stored procedure SP1 in Master database, but i use the tables from both master and stage.
    When i run this, i am getting the tables only from Master database but not from stage. i hope my requirement is clear.
    I am trying to find all the tables from all databases used by a stored proc.
    ;WITH stored_procedures AS (
    SELECT 
    o.name AS proc_name, oo.name AS table_name,
    ROW_NUMBER() OVER(partition by o.name,oo.name ORDER BY o.name,oo.name) AS row
    FROM sysdepends d 
    INNER JOIN sysobjects o ON o.id=d.id
    INNER JOIN sysobjects oo ON oo.id=d.depid
    WHERE o.xtype = 'P')
    SELECT proc_name, table_name FROM stored_procedures
    WHERE row = 1
    ORDER BY proc_name
    Please advice

    Your question is not entirely clear. You need to run the query on different databases.
    You may find this blog post helpful
    How to get information about all databases without a loop
    Check the last script in that blog post and modify to your particular purpose.
    For every expert, there is an equal and opposite expert. - Becker's Law
    My blog
    My TechNet articles

  • How to find full tables hierarchy in schema

    Hi,
    How to find the table hierarchy list from oracle schema by using Reference Key constraint?
    In my schema I am having many tables, approximate 4000 and from there I needs to get a single list which should be based in the Foriegn key based (Parent tables should be first then child tables)
    Regards
    Anee

    You can start with this
    select A.table_name children,
             B.TAble_name Father
    from DBA_CONSTRAINTS A,
            DBA_CONSTRAINTS B
    WHERE A.CONSTRAINT_TYPE = 'R'
         And B.Constraint_name = a.r_Constraint_name

  • How to find the records using contains with the word like this 'some text-some text'?

    Hi,
    How to find the records using the full text contains keyword and that column contains ‘some text-some text’
    In the above some text can be anything.
    Does anybody know please let me know.
    Thanks,

    Hello,
    You can try to create a Full Text Index on the table and use CONTAINS() to get the record which contains the specify words.
    For example:
    SELECT * FROM TABLE WHERE CONTAINS(column_name, 'some text')
    Reference:
    Full-Text Search (SQL Server)
    Creating Full Text Catalog and Full Text Search
    Regards,
    Fanny Liu
    Fanny Liu
    TechNet Community Support

  • How to find Object Styles

    Hello,
    Adobes Scripting Guide: JavaScript explains well(more or less) how to find text, greps and glyph. But lacking is how to find Object Styles. The Find/Change Dialog box in ID does have this option.
    What I would like is a script that will find a style, then fill in the color of that style so that one can clearly see in a long document where the style was used. When there are only subtle differences between styles, this is helpful.
    The first thing to do is to clear all the options and that is my first stumbling block. In the following code the first line works, clearing the find of any parameters. The second line does not work.
    app.findObjectPreferences = NothingEnum.nothing;
    app.findChangeObjectOptions = NothingEnum.nothing;
    I also need to set the Search for Documents (not All Documents nor Selection) and to set the Type for All Frames.
    The second obstacle is setting the Find so that it will find the object I am looking for. The code below does not work but I do not know why.
    app.findObjectPreferences.getElements("Object Style 1");
    Any help is appreciated.
    Tom

    You need this:
    app.findObjectPreferences = null;
    app.findObjectPreferences.appliedObjectStyles = "Object Style 1";
    found_objects = app.activeDocument.findObject();
    Some things are different in scripting compared to the interface. For instance, the scope of the search in the interface is just "document" or "all documents", but in a script you can search a page, a spread, almost anything (I have to say that this is true for text and grep searches, I never tried it for objects). Finding frame types is different as well: there's no parameter for that I don't think. Instead, you have to find all frames that have a particular object style applied to them, then cycle through them checking their frame type; if the type matches your criteria, do what you want with it.
    Peter

  • How to find Related Tables for the Tcode given.

    How to find Related Tables for the Tcode given. (master data)
    Thanks in advance.

    Hi Sridhar,
    Welcome to SDN.
    The tables for a given transaction can be seen in the transaction SE80.
    First goto SE93.
    Give ur Tcode and find the program name.
    Now goto SE80. select program in the first dropdown and give the program name in the second box. U can find the list of tables used.
    One more way is : use ST05.
    and One more is using FM 'get_tables'
    Thanks,
    Shailaja
    Edited by: Shailaja on Jul 11, 2008 12:33 PM

  • How to find Target tables in informatica

    Hi Guys,
    Could you please tell me the How to find target tables in OBIEE from OBIEE Repository
    Please any one reply me.
    Thanks,
    Siva
    Edited by: 912736 on Mar 20, 2012 7:12 PM

    Hi
    Open Repository:
    1- On Presentation Layer: Navigate to Subject Area which you want to trace Target Table.
    2- Right Click on desire Measure /Object
    3- List will appear and select 'Query for Physical Table' or 'Query fro Physical Column'.
    4- Window will appear and it will show you list of relevant Physical Tables.
    5- Select one of table and press Go button.
    Your target Tables are in Data warehouse not infromatica, Informatica is Responsible to Design & run your Workflows and other activities.
    However to trace Target table from Informatica (Workflow);
    If you want to trace Target Table than in Informatica you have 2 options.
    1- Openfirst you need to know Workflow, open workflow right click and in property you will see Query and from query you will know target table.
    2- open workflow from Workflow you will Know Mapping and open mapping than you will know Mapplet and from Mapplet you will know target table.
    Open Client >>PowerCenter and Open Mapllet, you will see Target
    Regards
    Edited by: Sher Ullah Baig on Mar 22, 2012 5:21 PM

  • How to find company code using sales doc. No

    Hi,
         I need to print company code, how to find company code using sales doc no. I don't find it VBAK.
    Cheers
    Senthil

    Dear Senthil
    You can find in table VBAK itself - Field BUKRS_VF
    thanks
    G. Lakshmipathi

  • How to find process chain using background job in sm37

    How to find process chain using background job in sm37

    Better is to select the job.
    Select (Define) Step (s) or F6.
    Select the line and Menu Goto>Variant.
    The variant contains the name of the CHAIN and its VARIANT.
    Success
    We faced an old job and via job monitoring we were informed about a cancelled job every 'interval'.
    We noticed that the related chain was deleted but still the job was scheduled each interval again and was cancelled because an event was missing
    We could not find the scheduled job via SM37.
    Via view V_OP, view over tbtco abd tbtcp, we find the related entry.
    We delete these entries via function BP_JOB_DELETE....
    Edited by: Jack Otten on Jul 9, 2010 2:50 PM

  • HOW TO  FIND OUT TABLE DESCRIPTION FROM JDBC?

    HOW WILL FIND OUT TABLE DESCRIPTION FROM JDBC?

    Have a look at ResultSetMetaData
    getColumnCount()
    getColumnName(int)
    getColumnTypeName(int)
    getColumnDisplaySize(int)
    ***Annie***

  • How to restore a table using RMAN with previous backup ?

    Hi everyone,
    we have to restore a table from 1 week previous backup using RMAN.
    Could you show me how to restore a table using RMAN with previous full backup.
    please Help me out.
    Thanks
    Info > oracle 10g, OS: AIX5L

    Hi,
    first of all you must have all the archivelogs since you want to recover your table from the previous backups.
    anyways if you want to recover your table then you need to perform incomplete recovery to the point where you loss the table for that you need to restore and recover your database.you likely to loose all the transcation which occurs to the point where you you loose your table.
    thanks..

Maybe you are looking for

  • Mail does not work properly with gmail

    Hi everyone. I am a very recent switcher and the switching process was great and extremely easy, but there has only been one problem that I can't seem to solve. Getting Gmail to work with Apple Mail. I followed all the steps on gmail's website on, ho

  • Migrating from NT MS SQL to Linux O8

    I know I can export all my sql server data and scripts and such and then import them into O8, but I was wondering if anyone has seen any kind of migration tool that will just allow me to transfer all my users, tables, dbs, sp's, etc..., to O8 on Linu

  • Moving a line from a smartphone to a reg phone?

    Long story short...my granddaughter used to live with me and I added a line to a smart phone to our account she ran off and wont bring the I phone back to me...I wondering if I can move the service over to an extra phone I have? I don't have the to p

  • BEx Web - Inserting Tabs with multiple Web Templates

    I encounter much difficulty to find consistent information on how to create a Web cockpit (BW3.5) by making use of embedded Web Templates (using web template web item). In particular, - How to define tab pages? - How to insert an HTML document in one

  • How to run python within Java?

    I want to run python command within java. Not sure how to do this. Seems like runtime.getRuntime.exec() is something that i can use. but all the examples were for unix platform and not any other. Can i run python command using getRuntime().. please l