PL/SQL Packages DBMS_UTILITY

DBMS_UTILITY.GET_TIME

This function returns the number of 100ths of seconds that have elapsed from an arbitrary time.

You should not use GET_TIME to establish the current time, but only to calculate the elapsed time
between two events. Without GET_TIME, Oracle functions can only record and provide elapsed time in
second intervals, which is a very coarse granularity in today’s world of computing. With GET_TIME,
you can get a much finer understanding of the processing times of lines in your program.

CREATE OR REPLACE PROCEDURE calc_totals
AS
BEGIN
UPDATE EMP SET SAL=SAL*2;
COMMIT;
END;
/

SET SERVEROUTPUT ON;
DECLARE
time_before BINARY_INTEGER;
time_after BINARY_INTEGER;
BEGIN
time_before := DBMS_UTILITY.GET_TIME;
calc_totals;
time_after := DBMS_UTILITY.GET_TIME;
DBMS_OUTPUT.PUT_LINE (time_after - time_before);
END;

GET_TIME

DBMS_UTILITY.IS_CLUSTER_DATABASE
This function finds out if this database is running in cluster database mode

set serveroutput on
BEGIN
IF dbms_utility.is_cluster_database THEN
dbms_output.put_line('TRUE');
ELSE
dbms_output.put_line('FALSE');
END IF;
END;
/

IS_CLUSTER_DATABASE

DBMS_UTILITY.COMPILE_SCHEMA
This procedure compiles all procedures, functions, and packages in the specified schema.

EXEC DBMS_UTILITY.compile_schema('SCOTT');

COMPILE_SCHEMA

source : {ORACLE_HOME}/rdbms/admin/dbmsutil.sql

Programs

Advertisements

Leave a Reply

Fill in your details below or click an icon to log in:

WordPress.com Logo

You are commenting using your WordPress.com account. Log Out / Change )

Twitter picture

You are commenting using your Twitter account. Log Out / Change )

Facebook photo

You are commenting using your Facebook account. Log Out / Change )

Google+ photo

You are commenting using your Google+ account. Log Out / Change )

Connecting to %s