Search This Blog

Showing posts with label redo. Show all posts
Showing posts with label redo. Show all posts

Monday, January 27, 2014

Oracle DB ratios explained

Here you will find two pdf (in french and english) with the explanation of the following ratios, and what to do to improve them, as well as your database performances:

  • Buffer Cache Hit Ratio 
  • Chained Row Ratio 
  • Database CPU Time Ratio
  • Database Wait Time Ratio
  • Dictionary Cache Hit Ratio 
  • Execute to Parse Ratio 
  • Get Hit Ratio 
  • Latch Hit Ratio 
  • Library Cache Hit Ratio 
  • Parse CPU to Elapsed Ratio 
  • Pin Hit Ratio 
  • Soft-Parse Ratio 
  • Library cache reload Ratio
  • Rollback Segment Wait to Get Ratio
  • In (PGA) Memory Sort Ratio
  • Buffer Nowait Ratio
  • Redo Nowait Ratio

In french

You can hit the gv$sysmetric view to most of those ratios.

Friday, December 27, 2013

DBMS_LOGMNR, or "How to see what's in the redo logs"


Contents:
1 Database-Level Supplemental Logging
2 Redo Log File Options
3 Example of Querying V$LOGMNR_CONTENTS
4 End the LogMiner Session





Database-Level Supplemental Logging:

ALTER DATABASE ADD SUPPLEMENTAL LOG DATA;



Redo Log File Options

Here you will tell you LOGMNR whate logfiles to look into. It can be done:

Automatically. Just define the time range you want to observe and start logmnr.
ALTER SESSION SET NLS_DATE_FORMAT = 'DD-MON-YYYY HH24:MI:SS';

EXECUTE DBMS_LOGMNR.START_LOGMNR( STARTTIME => '01-Jan-2003 08:30:00', ENDTIME => '01-Jan-2003 08:45:00', OPTIONS =>
DBMS_LOGMNR.DICT_FROM_ONLINE_CATALOG + DBMS_LOGMNR.CONTINUOUS_MINE);


Manually. You need to manually add every logfile you're interested in and then start logmnr.
EXECUTE DBMS_LOGMNR.ADD_LOGFILE( LOGFILENAME => '/oracle/logs/log1.f', OPTIONS => DBMS_LOGMNR.NEW);

EXECUTE DBMS_LOGMNR.ADD_LOGFILE( LOGFILENAME => '/oracle/logs/log.f', OPTIONS => DBMS_LOGMNR.ADDFILE);

EXECUTE DBMS_LOGMNR.START_LOGMNR(OPTIONS => DBMS_LOGMNR.DICT_FROM_ONLINE_CATALOG);



Example of Querying V$LOGMNR_CONTENTS


SELECT OPERATION, SQL_REDO, SQL_UNDO
  FROM V$LOGMNR_CONTENTS
  WHERE SEG_OWNER = 'OE' AND SEG_NAME = 'ORDERS' AND
  OPERATION = 'DELETE' AND USERNAME = 'RON';


End the LogMiner Session

EXECUTE DBMS_LOGMNR.END_LOGMNR;



Note: Everything is related to your session, so if you got disconnected, start again

Source: http://download.oracle.com/docs/cd/B28359_01/server.111/b28319/logminer.htm#i1015913