Follow Us on Twitter

ADRCI commands in practice

by Ian Hoogeboom on January 28, 2010 · 0 comments

The ADR has changed a lot for DBAs in maintenance land and since I have been using the ADR command interface, I found some nice tricks to navigate more quickly through the homes.

Here are some examples for the new Oracle 11g ADRCI in practice.
Lets assume these settings for the following examples:

ADR base is "/u01/app/oracle"
adrci> show homes
ADR Homes:
diag/rdbms/clone/CLONE
diag/rdbms/prod/PROD
diag/asm/+asm/+ASM
diag/tnslsnr/pc01/listener

Set a single home quickly

Although the help only tells you can leave out the ‘diag’ part, use ‘set home’ and just point to the last string of the path (if uniquely):

adrci> set home PROD

adrci> show home
ADR Homes:
diag/rdbms/prod/PROD

Solution One SID only

If you only have one database and listener, you can quickly set it with ‘rdbms’, as it is part of the string:

adrci> set home rdbms

adrci> show home
ADR Homes:
diag/rdbms/prod/PROD

Set multiple homes quickly

Same as above, but use ‘set homes’ and just point to the last strings of the paths (if uniquely):

adrci> set homes PROD, listener

adrci> show homes
ADR Homes:
diag/rdbms/prod/PROD
diag/tnslsnr/pc01/listener

Select homes based on path

Same as above, but use ‘set homepath’ and just point to the first part of the paths:

adrci> set homepath diag/rdbms

adrci> show homes
ADR Homes:
diag/rdbms/clone/CLONE
diag/rdbms/prod/PROD

Get back to your homes quickly

When you have set your home with ‘set home | homes | homepath’, there is no ‘simple’ command to get all the paths back.

adrci> show base
ADR base is "/u01/app/oracle"

adrci> set base "/u01/app/oracle"

adrci> show homes
ADR Homes:
diag/rdbms/clone/CLONE
diag/rdbms/prod/PROD
diag/asm/+asm/+ASM
diag/tnslsnr/pc01/listener

or try (lol):

adrci> exit
$ adrci

Tail through the alert file

Using a Unix like tail -f in ADRCI:

adrci> set home PROD

adrci> show alert -tail -f

Go through the alert.log on the Linux prompt via ADRCI

You will be forced someday to use only the ADRCI, the old alert.log will go away eventually…

$ adrci exec="set home PROD; show alert -term;" | grep ORA-

Create a fake incident

For who found the hidden help level, the ‘create incident’ example is a bit mucked up, try the following (all on one line):

adrci> create incident problem_key="ORA-00600"
                       error_message="[Memory corruption]"
                       error_facility=ORA
                       error_number=600

More about Troubleshooting ORA-04030 process memory errors with the ADR Command Interpreter (ADRCI) in this newer blog post.

ADRCI commands in practice, 4.5 out of 5 based on 4 ratings
Ratings:
VN:F [1.9.22_1171]
Rating: 4.5/5 (4 votes cast)
Tags: , ,

{ 0 comments… add one now }

Leave a Comment

 

Previous post:

Next post:

About Whitehorses
Company profile
Services
Technology

Whitehorses website

Home page
Whitebooks
Jobs

Follow us
Blog post RSS
Comment RSS
Twitter