Purpose
Shows the contents of the alert log in the default editor.
Syntax and Description
show alert [-p "predicate_string"] [-tail [num] [-f]] [-term] [-file alert_file_name]
Except when using the -term
flag, this command works with only a single current ADR home. If more than one ADR home is set, ADRCI prompts you to choose the ADR home to use.
Table 17-12 Flags for the SHOW ALERT command
Flag | Description |
---|---|
|
Uses a SQL-like predicate string to show only the alert log entries for which the predicate is true. The predicate string must be enclosed in double quotation marks. Table 17-13 lists the fields that can be used in the predicate string. |
|
Displays the most recent entries in the alert log. Use the If the |
|
Directs results to the terminal. Outputs the entire alert logs from all current ADR homes, one after another. If this option is not given, the results are displayed in the default editor. |
|
Enables you to specify an alert file outside the ADR. |
Table 17-13 Alert Fields for SHOW ALERT
Field | Type |
---|---|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
Examples
This example shows all alert messages for the current ADR home in the default editor:
show alert
This example shows all alert messages for the current ADR home and directs the output to the terminal instead of the default editor:
show alert -term
This example shows all alert messages for the current ADR home with message text describing an incident:
show alert -p "message_text like '%incident%'"
This example shows the last twenty alert messages, and then keeps the alert log open, displaying new alert log entries as they arrive:
show alert -tail 20 -f
This example shows all alert messages for a single ADR home in the default editor when multiple ADR homes have been set:
show alert Choose the alert log from the following homes to view: 1: diag/tnslsnr/dbhost1/listener 2: diag/asm/+asm/+ASM 3: diag/rdbms/orcl/orcl 4: diag/clients/user_oracle/host_9999999999_11 Q: to quit Please select option: 3