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 Help Members By Posting Answers For Below Questions

Please send me Informatica 8.1 certification dumps, my mail id mona85gupta@gmail.com

1956


Design database draw er diagram for a certain scenario ?

4656


How to start an oracle instance?

1103


How to select all columns of all rows from a table in oracle?

1132


How to write a left outer join with the where clause in oracle?

1155


What is oracle latest version?

1174


How to put more than 1000 values into an oracle in clause?

1115


How to use values from other tables in update statements using oracle?

1158