11g RAC: ADRCI

Hi Everyone!!

I have earlier posted 11g Automatic Diagnostic Repository feature.
In this post I will be covering how it helps effectively in 11g RAC environment.
Command Line utility ADRCI is best tool you can have to monitor the RAC environments.

1) It enables you to monitor the alert logs from adrci prompt.( Do not have to cd to alert directories).

2) Finding incidents that happen across the instances

3) Finding problems happen across instances

What you need to do in RAC?

To make use of ADRCI in better way in RAC set dignostic_dest init.ora to same common shared location in all the instances.

This creates the ADR directory structures like the one shown in the picture


ADRCI usage in RAC:

-bash-3.00$ adrci

ADRCI: Release 11.1.0.6.0 - Beta on Tue Jan 15 07:51:56 2008
Copyright (c) 1982, 2007, Oracle. All rights reserved.
ADR base = "/slot10/tkr12r3m/adr_base"

adrci> set homes diag/rdbms/tkr12r3m/tkr12r3m1 diag/rdbms/tkr12r3m/tkr12r3m2 diag/rdbms/tkr12r3m/tkr12r3m3 (this is first time setting)

adrci> show homes
ADR Homes:
diag/rdbms/tkr12r3m/tkr12r3m1
diag/rdbms/tkr12r3m/tkr12r3m2
diag/rdbms/tkr12r3m/tkr12r3m3

adrci> show alert
Choose the alert log from the following homes to view:
1: diag/rdbms/tkr12r3m/tkr12r3m1
2: diag/rdbms/tkr12r3m/tkr12r3m2
3: diag/rdbms/tkr12r3m/tkr12r3m3
Q: to quit Please select option: q (Choose 1 to see first instance's alert log)

adrci> show problem (To list errors occured with different instnaces-my RAC environment is clean- no problems found)
ADR Home = /slot10/tkr12r3m/adr_base/diag/rdbms/tkr12r3m/tkr12r3m1: ************************************************************************* 0 rows fetched ADR Home = /slot10/tkr12r3m/adr_base/diag/rdbms/tkr12r3m/tkr12r3m2: ************************************************************************* 0 rows fetched ADR Home = /slot10/tkr12r3m/adr_base/diag/rdbms/tkr12r3m/tkr12r3m3: ************************************************************************* 0 rows fetched adrci>


Its really wonderful to look at the issues from single prompt - no need to scan through alert logs of each and every instance - to find the ora- xyz errors/problems/incidents.

Hope this will help you better when you move to 11g.


Here is additional way to purge old incidents and logs. This small snippet works settings up policies for all homes. works in 19c as well.

adrci exec="show homes"|grep -v "ADR Homes:"|awk '{print "set homepath "$1";set control (SHORTP_POLICY=168); set control (LONGP_POLICY=720);"}'> adrscript.adi;adrci script=adrscript.adi;for f in $(adrci exec="show homes" | grep -v "ADR Homes:" ) ; do adrci exec="set home $f; show control;" ; done


Happy Learning!!

4 comments:

Abhilash said...

Hi,

Thanks for explanation of adrci.

I didnt quite understand how you are monitoring RAC instances alert logs.

Are you using shared location for diag destination.

I am in the process of scripting adrci for monitoring multinode RAC. I would like get more ideas.

Please mail me::
abhilash.paladugu@gmail.com

Regards,

Abhilash

Suresh Lakshmanan said...

Hi Abhilash,

yes, it is in shared location. you probably make it simple by parsing the text alert log for each node. going to be same as pre 11g alert log parsing.

Thanks
Suresh

Abhilash said...

Hi Suresh,

Yeah that what i thought. Thanks for your reply.

Regards,

Abhilash

Rafi said...

Hi Suresh,

Nice notes...

Best regards,

Rafi.