version 9.7
…
I can’t find the button for the SQL profiler
and the menu item : Session -> Toggle
PL/SQL profiling is disabled ?
Hey Djamel (I’m guessing that’s your first name);
It’s a good idea to keep such follow up questions on the list. Someone else
would then have an opportunity of responding before I even wake up
Additionally, It’s useful for others that might have the same question.
So… on to the answer:
Toad queries the database to see what you have access to and enables/disables
certain features. One of those features is the profiling functionality.
The profiler functionality is Oracle created. Toad is simply a front-end GUI to
access it and parse the information it generates.
This is the part where I mentioned the DBA needs to make sure the proper package
(dbms_profiler) is installed in the database. Additionally, the user you are
logging in as needs to be able to access that package. I’m not sure what other
access you might require. Perhaps Norm can outline the specifics beyond what
I’ve covered.
You can verify the package and access so you know what you need to request from
your DBA with the following as run in SQL Plus. I guide you to SQL Plus for one
reason – you will know for sure that any error message produced is Oracle, not
Toad, so you eliminate any issues with the Tool completely from the picture.
DESC dbms_profiler;
If the package is not installed or you don’t have any access to it at all,
you’ll see an error like:
ERROR:
ORA-04043: object dbms_profiler does not exist
If you see a package described, you can test basic access with:
SELECT dbms_profiler.stop_profiler FROM DUAL;
Note: Don’t be surprised if the DBA refuses to enable the profiler on a
production database. If that is where you are attempting to do your performance
analysis, you will likely need the DBA involved in order to acquire the
information you need. Production is supposed to be a very controlled environment
and allowing a dev such access as to be able to run a 20-hour query in profiling
is a very, very bad idea (and I’m a Developer, not a DBA). However, for a Dev
environment, the DBA shouldn’t have any issues with setting up the profiler so
you can use it.
Roger S.