|
 |
|
Automating Oracle
Oracle Tips by Mike Ault |
Automated Statistics Gathering
par_name IN VARCHAR2,
par_value IN NUMBER,
rep_ord IN NUMBER,
m_date IN DATE,
par_delta IN NUMBER,
is_interactive IN BOOLEAN) IS
BEGIN
IF NOT is_interactive
THEN
INSERT INTO Remote DBA_running_stats VALUES(
par_name,par_value,rep_ord,m_date,par_delta
);
ELSE
INSERT INTO Remote DBA_temp VALUES(
par_name,par_value,rep_ord
);
END IF;
END;
--
BEGIN
IF NOT is_interactive
THEN
DELETE Remote DBA_temp;
END IF;
SELECT sysdate INTO meas_date FROM dual;
comp_date:=meas_date;
BEGIN
DBMS_REVEALNET.STARTUP_DATE(start_date);
IF start_date IS NOT NULL THEN
stat_name:='Startup Date: '||TO_CHAR(start_date,'dd-mon
yy hh24:mi:ss');
write_out (stat_name,0,1,meas_date,0,is_interactive);
;
ELSE
stat_name:='Startup Date: unknown';
write_out (stat_name,0,1,meas_date,0,is_interactive);
END IF;
END;
BEGIN
stat_name := 'recursive calls';
SEE CODE DEPOT FOR FULL SCRIPTS
 |
For more information on this topic, I recommend Don
Burleson's latest book "Oracle
Tuning: The Definitive Reference".
You can buy it direct from the publisher for 50%-off and get
instant access to the code depot of Oracle tuning scripts: |
http://www.rampant-books.com/book_1002_oracle_tuning_definitive_reference_2nd_ed.htm
 |
Expert Remote DBA
BC is America's oldest and largest Remote DBA Oracle support
provider. Get real Remote DBA experts, call
BC Remote DBA today. |
 |
|