This forum is currently locked. You can't register or post questions at this time. (read more)

Is there a way to check number of redos in PL/SQL

All posts relating to Oracle database administration.

Moderator: Tim...

kytemaniac
Senior Member
Posts: 234
Joined: Tue May 19, 2009 12:59 am

Is there a way to check number of redos in PL/SQL

Postby kytemaniac » Sun Mar 31, 2013 2:01 pm

Hi

my code is as follow:

Code: Select all

set autotrace on statistics
set timing on
set echo on
set serveroutput on

exec dbms_output.put_line ('1');

TRUNCATE TABLE tableA;


exec dbms_output.put_line ('2');

BEGIN

-- insert terminal-level subscription for OE (automatically applicable to PPE)
INSERT /*+ append */ INTO tableA
SELECT * from tableB
END;
/
 
    
exec dbms_output.put_line ('6');



and output is as follow

Code: Select all

EXCEL@shielo>set serveroutput on
EXCEL@shielo>
EXCEL@shielo>exec dbms_output.put_line ('1');
1                                                                               

PL/SQL procedure successfully completed.

Elapsed: 00:00:00.06
EXCEL@shielo>
EXCEL@shielo>TRUNCATE TABLE tableA;

Table truncated.

Elapsed: 00:00:00.14
EXCEL@shielo>

EXCEL@shielo>exec dbms_output.put_line ('2');
2                                                                               

PL/SQL procedure successfully completed.

Elapsed: 00:00:00.09
EXCEL@shielo>
EXCEL@shielo>-- re-populate tableA. This table contains both terminal and merchant-level
EXCEL@shielo>-- subscription, as well as flags for applicable for both OE and PPE
EXCEL@shielo>BEGIN
4  INSERT /*+ append */ INTO tableA
5  SELECT * from tableB
6  END;
7  /

PL/SQL procedure successfully completed.


PL/SQL procedure successfully completed.

Elapsed: 00:00:08.93
EXCEL@shielo>
EXCEL@shielo>
EXCEL@shielo>exec dbms_output.put_line ('6');
6                                                                               

PL/SQL procedure successfully completed.



obvious output I'm missing is the number of redo logs that I wanted to see, I there a way to see the statistics in an PL/SQL block?

thanks

Tim...
Site Admin
Posts: 18437
Joined: Mon Nov 01, 2004 5:56 pm
Location: England, UK
Contact:

Re: Is there a way to check number of redos in PL/SQL

Postby Tim... » Sun Mar 31, 2013 3:05 pm

Hi.

If you want to check this sort of thing from PL/SQL you are better using a tool like snapper.

http://tech.e2sn.com/oracle-scripts-and ... on-snapper

Cheers

Tim...
Tim...
Oracle ACE Director
Oracle ACE of the Year 2006 - Oracle Magazine Editors Choice Awards
OakTable Member
OCP DBA 7.3, 8, 8i, 9i, 10g, 11g
OCP Advanced PL/SQL Developer
Oracle Database: SQL Certified Expert
My website: http://www.oracle-base.com
My blog: http://www.oracle-base.com/blog


Return to “Oracle Database Administration”

Who is online

Users browsing this forum: No registered users and 2 guests

cron