ADRCI: ADR Command Interpreter : 3. Starting ADRCI and Getting Help

Starting ADRCI and Getting Help




You can use ADRCI in interactive mode or batch mode. Details are provided in the following sections:

1. Using ADRCI in Interactive Mode
2. Getting Help
3. Using ADRCI in Batch Mode



1. Using ADRCI in Interactive Mode

Interactive mode prompts you to enter individual commands one at a time. Each entered command is followed by its output.

To use ADRCI in interactive mode:

Ensure that the ORACLE_HOME and PATH environment variables are set properly.

The PATH environment variable must include ORACLE_HOME/bin.

Enter the following command at the operating system command prompt:

ADRCI
The utility starts and displays the following prompt:

adrci>
Enter ADRCI commands, following each with the Enter key.

Enter one of the following commands to exit ADRCI:

EXIT
QUIT


2. Getting Help

With the ADRCI help system, you can:

i. View a list of ADR commands.
ii. View help for an individual command.
iii. View a list of ADRCI command line options.


i. View a list of ADR commands


a. Start ADRCI in interactive mode.
b. At the ADRCI prompt, enter the following command:

HELP

ii. View help for an individual command

a. Start ADRCI in interactive mode.
b. At the ADRCI prompt, enter the following command:

HELP command

e.g.
HELP SHOW TRACEFILE


iii. View a list of ADRCI command line options

a. Enter the following command at the operating system command prompt:

ADRCI -HELP

b. The utility displays output similar to the following:

Syntax:
   adrci [-help] [script=script_filename] [exec="command [;command;...]"]
Options      Description                                    (Default)
-----------------------------------------------------------------
script       script file name                                (None)
help         help on the command options           (None)
exec         exec a set of commands                  (None)
-----------------------------------------------------------------


3. Using ADRCI in Batch Mode

Batch mode enables you to run a series of ADRCI commands at once, without being prompted for input.

Batch mode enables you to include ADRCI commands in shell scripts or Windows batch files. Like interactive mode, the ORACLE_HOME and PATH environment variables must be set before starting ADRCI.


To submit ADRCI commands on the command line:

Enter the following command at the operating system command prompt:

ADRCI EXEC="COMMAND[; COMMAND]..."

For example, to run the SHOW HOMES command in batch mode, enter the following command at the operating system command prompt:

ADRCI EXEC="SHOW HOMES"


To run the SHOW HOMES command followed by the SHOW INCIDENT command, enter the following:

ADRCI EXEC="SHOW HOMES; SHOW INCIDENT"


To run ADRCI scripts:

Enter the following command at the operating system command prompt:

ADRCI SCRIPT=SCRIPT_FILE_NAME

For example, to run a script file named adrci_script.txt, enter the following command at the operating system command prompt:

ADRCI SCRIPT=adrci_script.txt

A script file contains a series of commands separated by semicolons (;) or line breaks, such as:

SET HOMEPATH diag/rdbms/orcl/orcl; SHOW ALERT -term

No comments:

Post a Comment