executeScript::=
To run a local or global RMAN script stored in the recovery catalog.
See Also:
"CREATE SCRIPT" and Oracle Database Backup and Recovery Advanced User's Guide for more details about stored scriptsUse EXECUTE SCRIPT
only within the braces of a RUN command.
RMAN must be connected to the catalog with the CATALOG
command-line option or the CONNECT CATALOG
command, and the catalog must be open.
For a local script, RMAN must be connected to the target database for which the local script is created.
When you run an EXECUTE
SCRIPT
command within a RUN
block, RMAN places the contents of the script in the context of that RUN block. For this reason, you should not allocate a channel within the RUN block if you also allocate it in the script.
Syntax Element | Description |
---|---|
GLOBAL |
Specifies the execution of a global stored script instead of a local one. |
'script_name' |
The name of the stored script to execute.
If no local stored script defined for the current target database is found with the name specified, RMAN searches for a global script by the same name and executes it if one is found. See Also: "LIST" for more information about listing the scripts stored in the recovery catalog, and "CREATE SCRIPT" for information about creating scripts |
Executing a Script: Example This example runs a stored script called backup_whole_10
:
RUN { EXECUTE script backup_whole_10; }