Difference between revisions of "Adrci"

From dbawiki
Jump to: navigation, search
(adrci)
(Use command line interface from shell)
Line 31: Line 31:
 
adrci exec="show homes"
 
adrci exec="show homes"
 
adrci exec="set home diag/tnslsnr/ravjde01/listener_ravjde1;show control"
 
adrci exec="set home diag/tnslsnr/ravjde01/listener_ravjde1;show control"
adrci exec="set home diag/tnslsnr/ravjde01/listener_ravjde1;set control (shortp_policy=360,longp_policy=720);purge;show control"
+
adrci exec="set home diag/tnslsnr/ravjde01/listener_ravjde1;set control (shortp_policy=360,longp_policy=720);purge;show control;"
 
</pre>
 
</pre>

Revision as of 13:20, 15 November 2013

adrci

A useful way to keep the purging of trace files under control.
With an Oracle database environment setup, type:

adrci

To get out, type:

adrci> exit

To get help, type:

adrci> help

To see current setup, type:

adrci> show control

SHORTP_POLICY and LONGP_POLICY are number of hours to keep trace files and alert files respectively. These can be changed by typing:

set control (SHORTP_POLICY=240)

Trace files will now be deleted after 10 days.
If space is running low, you can manually delete trace files like this:

purge -age 3600 -type TRACE

This deletes all trace files older than 1 day (note the age parameter is minutes, not hours).

Use command line interface from shell

adrci exec="show homes"
adrci exec="set home diag/tnslsnr/ravjde01/listener_ravjde1;show control"
adrci exec="set home diag/tnslsnr/ravjde01/listener_ravjde1;set control (shortp_policy=360,longp_policy=720);purge;show control;"