Batch mode enables you to run a series of ADRCI commands at once, without being prompted for input. To use batch mode, you add a command line parameter to the ADRCI
command when you start ADRCI. 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.
The following command line parameters are available for batch operation:
Table 17-1 ADRCI Command Line Parameters for Batch Operation
Parameter | Description |
---|---|
|
Enables you to submit one or more ADRCI commands on the operating system command line that starts ADRCI. Commands are separated by semicolons (;). |
|
Enables you to run a script containing ADRCI commands. |
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