How to find procedure/package by SQL statement(SQL_TEXT) for tuning

Posted on 2004-10-21
Last Modified: 2008-01-09

Our systems are running well-known ERP and Oracle 8i or above.
We have performance issues.
We can find problematic SQL statements (SQL full text)by monitoring, but we don't know
which procedure/package the SQL statements were executed from.

Could anyone please tell us how to find procedure/packages by SQL text?

Assumption: we did not set module, action, client_info, etc by using

Thank you in advance.
Question by:drcrazy44
    LVL 9

    Assisted Solution

    LVL 8

    Accepted Solution

    Views USER_SOURCE and DBA_SOURCE hold the code. Something like this would be helpful :

    SELECT name
    FROM user_source
    WHERE text = <problematic_SQL>;
    LVL 9

    Expert Comment

    use statspack. documentation : ORACLE_HOME/rdbms/admin/spdoc.txt

    Author Comment

    Thank you very much for all.

    Write Comment

    Please enter a first name

    Please enter a last name

    We will never share this with anyone.

    Featured Post

    Course: MongoDB Object-Document Mapper for NodeJS

    NodeJS (JavaScript on the server) is awesome, but some developers get confused about NoSQL when it comes to working in Node with MongoDB (NoSQL database). Do you need a better explanation of how to use Node.js with MongoDB? The most popular choice is the Mongoose library.

    I remember the day when someone asked me to create a user for an application developement. The user should be able to create views and materialized views and, so, I used the following syntax: (CODE) This way, I guessed, I would ensure that use…
    Checking the Alert Log in AWS RDS Oracle can be a pain through their user interface.  I made a script to download the Alert Log, look for errors, and email me the trace files.  In this article I'll describe what I did and share my script.
    This video shows, step by step, how to configure Oracle Heterogeneous Services via the Generic Gateway Agent in order to make a connection from an Oracle session and access a remote SQL Server database table.
    This video shows information on the Oracle Data Dictionary, starting with the Oracle documentation, explaining the different types of Data Dictionary views available by group and permissions as well as giving examples on how to retrieve data from th…

    857 members asked questions and received personalized solutions in the past 7 days.

    Join the community of 500,000 technology professionals and ask your questions.

    Join & Ask a Question

    Need Help in Real-Time?

    Connect with top rated Experts

    18 Experts available now in Live!

    Get 1:1 Help Now