cd /u01/app/oracle (is my adr base)
adrci (press enter)
adrci> help
The main use of adrci command line utility is to view alert log file and trace files.
show alert
Choose the alert log from the following homes to view:
1: diag/tnslsnr/m1/listener
2: diag/asm/+asm/+ASM
3: diag/rdbms/prod/prod
Q: to quit
Here choose 3 to read alert log file.
3 (press enter)
This will show the entire alert log file. To quit this alert log file:
:quit
We will come back to main menu. To quit from here press Q.
To see the last 20 lines from the alert log file:
show alert -tail 20
This will throw below error as we got here multiple adr homes, like asm and rdbms etc.
DIA-48449: Tail alert can only apply to single ADR home
to clear the screen we can use the below command:
host "clear"
We need to set a single home to use tail command. To set rdbms home:
set home diag/rdbms/prod/prod
now we use the command to see bottom 20 lines
show alert -tail 20
If we only want to see ORA- error messages:
show alert -p "message_text like '%ORA-%'"
If we want to see only the incidents:
show alert -p "message_text like '%incident%'"
To see the list of trace files:
show tracefile
To see a particular trace file from the above list:
show trace /u01/app/oracle/diag/rdbms/prod/prod/trace/prod_vkrm_5427.trc
No comments:
Post a Comment