Search This Blog

Monday, June 27, 2011

Start and Stop RAC Listeners

lsnrctl stop listener affect only the connected node

On two nodes RAC cluster use the following commands to stop and start RAC's listeners

[oracle@rac2 ~]$ srvctl start listener -n rac1
[oracle@rac2 ~]$ srvctl start listener -n rac2

Sunday, June 26, 2011

Restore Oracle RAC OCR file( Oracle Cluster Registry)



oracle@rac2 dbs]$ ocrconfig -showbackup

rac2 2011/01/01 22:42:51 /oracle/crs/oracle/product/10.2.0/crs/cdata/crs

rac2 2011/01/01 18:42:50 /oracle/crs/oracle/product/10.2.0/crs/cdata/crs

rac2 2011/01/01 14:42:50 /oracle/crs/oracle/product/10.2.0/crs/cdata/crs

rac1 2010/12/31 20:40:10 /oracle/crs/oracle/product/10.2.0/crs/cdata/crs

rac1 2010/12/23 16:52:33 /oracle/crs/oracle/product/10.2.0/crs/cdata/crs

/etc/init.d/init.crs stop ## Do in all nodes
ocrconfig -restore /oracle/crs/oracle/product/10.2.0/crs/cdata/crs/backup01.ocr
/etc/init.d/init.crs start ## Do in all nodes

Tuesday, June 14, 2011

How to calculate Undo Space (Undo tablespace) for a specific UNDO_RETENTION

SELECT d.undo_size/(1024*1024) "ACTUAL UNDO SIZE [MByte]",
TO_NUMBER(&&Undo_retention) "UNDO RETENTION [Sec]",
(TO_NUMBER(&Undo_retention) * TO_NUMBER(f.value) *
g.undo_block_per_sec) / (1024*1024)
"NEEDED UNDO SIZE [MByte]"
FROM (
SELECT SUM(a.bytes) undo_size
FROM v$datafile a,
v$tablespace b,
dba_tablespaces c
WHERE c.contents = 'UNDO'
AND c.status = 'ONLINE'
AND b.name = c.tablespace_name
AND a.ts# = b.ts#
) d,
v$parameter e,
v$parameter f,
(
SELECT MAX(undoblks/((end_time-begin_time)*3600*24))
undo_block_per_sec
FROM v$undostat
) g
WHERE e.name = 'undo_retention'
AND f.name = 'db_block_size'
/

Friday, June 10, 2011

Create a version query

According the init. parameter UNDO_RETENTION = 900 (15 min) you can see the tuples versions as below:

select * from

VERSIONS BETWEEN TIMESTAMP
to_timestamp('2011/06/07 9:30:00', 'YYYY/MM/DD HH24:MI:SS')
AND
to_timestamp('2011/06/07 9:35:00', 'YYYY/MM/DD HH24:MI:SS')













Thursday, June 2, 2011

Clean Oracle's Report Server Jobs Queue

Valid for Oracle Application server 10.2



Stop Report Server
Rename the dat file present in $ORACLE_HOME/reports/server directory and restart the server again