Wednesday, May 9, 2007

DBMS_UTILITY.GET_TIME()

Sample code to test if dbms_utility is working

SELECT name
FROM dba_dependencies
WHERE referenced_name = 'DBMS_UTILITY'
UNION
SELECT referenced_name
FROM dba_dependencies
WHERE name = 'DBMS_UTILITY';

o/p:
ALL_OBJECTS
etc.,

once u successfully execute this w/o exceptions..ur ready to use the dbms_utility.get_time() in the stored procs

dbms_output.put_line('time: ' || ROUND((dbms_utility.get_time() - nStart)/100, 3) || ' s');

Know More: http://thinkoracle.blogspot.com/2006_08_01_archive.html

Cool function..to estimat ur sql times

No comments: