I would like to accept the answer by markgeer even though we used text search to resolve our problem. Eventually this is the solution for our question
Main Topics
Browse All TopicsHi,
I am running oracle database on XP. I need to find out how I can know if store procedure is called or not. Thanks.
This Question has been solved and asker verified All Experts Exchange premium technology solutions are available to subscription members.
Experts Exchange has been collecting answers to technology questions since 1996…3 million and counting! If you have a question, chances are we already have your answer.
If you can't find the exact answer you're looking for, ask our exclusive community of 50,000 experts. You’ll get a personalized answer from a trusted professional.
Thousands of free tech tips, tricks, how-to’s and tutorials are available in our peer reviewed articles section. See for yourself how smart our experts are, no login required.
Access the answers to your technology questions today.
30-day free trial. Register in 60 seconds.
Members of the expert community talk about why the experience at Experts Exchange is different than what you will find anywhere else.

Try it out and discover for yourself.
30-day free trial. Register in 60 seconds.
Join the community of experts here and help other tech pros by answering question in your area of expertise. You can earn FREE access to all Experts Exchange's premium features and resources.
Business Accounts
Answer for Membership
by: markgeerPosted on 2004-09-23 at 10:56:27ID: 12135899
There is no easy, built-in way. It makes no difference whether the database is on XP, Linux, Unix, etc.
Three possible options **may** get you part of what you want. These are the v$sqlarea view, LogMiner and auditing.
Try this select:
select sql_text from v$sqlarea;
This will give you the list of all SQL statements that have been executed recently. That includes calls of PL\SQL stored procedures. This view is fairly fast to query from, but the disadvantages of this view are:
1. records are purged from it periodically to make room for new SQL statements
2. all records are cleared from it if/when your database is shutdown
3. if a statements is executed multiple times, the number of times is recorded, but not the time or logon user for each one.
LogMiner is an Oracle utility that you can use to look through the redo logs for all SQL statements if your database is in archivelog mode. If not, you will be limited to seeing recent statements that are still in the on-line redo logs.
Also, this utility is quite slow to use, and somewhat buggy (especially before Oracle9.2).
Auditing is an Oracle option that is tuned off by default, but you can turn it on for tables (not stored procedures) that you are interested in. Be careful with this though, since the volume of data generated can be huge and must be managed.
Your best long-term approach: find the source code for the procedure, modify it to include a logging command (probably an insert into a table you create for this purpose) then re-compile it. You can get the source code with a select from "all_source" if you don't have any other copies of the source code. If the source has been "wrapped" (encrypted) then you will have to go back to the person/organization that wrote it and ask them to modify it the way you want.