adspace
is there a tool to trace queries, like profiler for sql server?
Answer Posted / Ravi Deep Rawat
"Yes, Oracle provides the `DBMS_PROFILER` package to capture and analyze SQL statements execution statistics. Here's an example:
```sqln
DECLAREn
prm_handle DBMS_PROFILER.HANDLE;n
event_name VARCHAR2(30) := 'my_event';n
sample_stats DBMS_PROFILER.SAMPLE_STATS_LIST; n
BEGINn
DBMS_PROFILER.CREATE_EVENT_CALLSTACK (event_name, NULL, TRUE);n
DBMS_PROFILER.START_Sampling(prm_handle, event_name, sample_stats);n
-- Execute SQL statements heren
DBMS_PROFILER.STOP_Sampling(prm_handle); n
DBMS_OUTPUT.PUT_LINE('Sampling finished'); n
END;n
| Is This Answer Correct ? | 0 Yes | 0 No |
Post New Answer View All Answers
Please send me Informatica 8.1 certification dumps, my mail id mona85gupta@gmail.com
Design database draw er diagram for a certain scenario ?
How to start an oracle instance?
How to select all columns of all rows from a table in oracle?
How to write a left outer join with the where clause in oracle?
What is oracle latest version?
How to put more than 1000 values into an oracle in clause?
How to use values from other tables in update statements using oracle?