is there a tool to trace queries, like profiler for sql server?
Answer / 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 |
Differentiate between translate and replace?
how to find the n'th highest salary from emp ?
find out first highest salary?
10 Answers Verinon Technology Solutions,
List out the components of logical database structure of oracle database.
How can Oracle users be audited?
when a grant option is encountered for a table EMP to a peer sitting beside you who has already having the table of that name (EMP), then what is the result?
How to create a new tablespace in oracle?
How to convert csv to table in oracle?
Please explain drop constraint oracle?
What is forall Statement ?
two tables are there emp(eno,ename,sal,deptno),dept(deptno,dname).how form the query in deptno,ename,max(sal)
write a query to dispaly those name who is more than one in student table? example- in a student table sandeep kumar comes 4 times, rakesh kumar comes 2 times, ajit kumar comes 1 times so query will display sandeep kumar and rakesh kumar single times.