Tuesday, August 4, 2009

How to generate AWR Report for all instances in Oracle 11g RAC?

spawrrac.sql:This script generates a global AWR report to report performance statistics on all nodes of a cluster.

Different Object types in Oracle 11g DB

Different Object types in Oracle 11g DB:
1 = INDEX,
2 = TABLE,
3 = CLUSTER,
4 = VIEW,
5 = SYNONYM,
6 = SEQUENCE,
7 = PROCEDURE,
8 = FUNCTION,
9 = PACKAGE,
10 = NON-EXISTENT,
11 = PACKAGE BODY,
12 = TRIGGER,
13 = TYPE,
14 = TYPE BODY,
19 = TABLE PARTITION,
20 = INDEX PARTITION,
21 = LOB,
22 = LIBRARY,
23 = DIRECTORY ,
24 = QUEUE,
25 = IOT,
26 = REPLICATION OBJECT GROUP,
27 = REPLICATION PROPAGATOR,
28 = JAVA SOURCE,
29 = JAVA CLASS,
30 = JAVA RESOURCE,
31 = JAVA JAR,
32 = INDEXTYPE,
33 = OPERATOR ,
34 = TABLE SUBPARTITION,
35 = INDEX SUBPARTITION
82 = (Data Mining) MODEL
92 = OLAP CUBE DIMENSION,
93 = OLAP CUBE ,
94 = OLAP MEASURE FOLDER,
95 = OLAP CUBE BUILD PROCESS


Source: 11g: dcore.bsq . The object types 92-95 are newly introduced in 11g DB for "On-line Analytical Processing".
Futher detail visit site: "http://www.oracle.com/technology/products/bi/olap/index.html"

Oracle 11g DB locks Details

Oracle 11g DB locks Details:

Lock type:
'MR', 'Media Recovery',
'RT', 'Redo Thread',
'UN', 'User Name',
'TX', 'Transaction',
'TM', 'DML',
'UL', 'PL/SQL User Lock',
'DX', 'Distributed Xaction',
'CF', 'Control File',
'IS', 'Instance State',
'FS', 'File Set',
'IR', 'Instance Recovery',
'ST', 'Disk Space Transaction',
'TS', 'Temp Segment',
'IV', 'Library Cache Invalidation',
'LS', 'Log Start or Switch',
'RW', 'Row Wait',
'SQ', 'Sequence Number',
'TE', 'Extend Table',
'TT', 'Temp Table',

Lock Mode:
0, 'None', /* Mon Lock equivalent */
1, 'Null', /* N */
2, 'Row-S (SS)', /* L */
3, 'Row-X (SX)', /* R */
4, 'Share', /* S */
5, 'S/Row-X (SSX)', /* C */
6, 'Exclusive', /* X */
blocking_others:
0, 'Not Blocking', /* Not blocking any other processes */
1, 'Blocking', /* This lock blocks other processes */
2, 'Global', /* This lock is global, so we can't tell */
to_char(block)) blocking_others

DBA_LOCK_INTERNAL has a row for each lock or latch that is being held, and
one row for each outstanding request for a lock or latch.
The columns of DBA_LOCK_INTERNAL are:
session_id - session holding or acquiring the lock
type - type of lock (DDL, LATCH, etc.)
mode_held - mode the lock is currently held in by the session
mode_requested - mode that the lock is being requested in by the process
lock_id1 - type specific identifier of the lock
lock_id2 - type specific identifier of the lock

Important objects to view lock monitoring: DBA_KGLLOCK, DBA_LOCKS, DBA_LOCK_INTERNAL, DBA_DML_LOCKS, DBA_DDL_LOCKS, DBA_WAITERS, DBA_BLOCKERS, V$LOCK, V$LOCKED_OBJECT,
V$$SESSION_WAIT,V$RESOURCE_LIMIT, V$lock_element, V$lock_activity,v$locks_with_collisions

Further Details can be found in $ORACLE_HOME/rdbms/admin/catblock.sql