printScript::=
To print a local or global stored script to standard output or to a file.
For more information about stored scripts, see "CREATE SCRIPT".
Use this command only at the RMAN prompt.
You must be connected to the target database that you connected to when you created or replaced the script.
You must be connected to the recovery catalog, and the recovery catalog database must be open.
Syntax Element | Description |
---|---|
GLOBAL |
With the GLOBAL option, PRINT SCRIPT prints the global script named 'script_name ' instead of the local script.
If omitted, RMAN looks for a local or global script See "CREATE SCRIPT" for more details about local and global stored scripts. |
' script_name ' |
The name of the script to print. |
TO FILE ' filename ' |
With TO FILE 'filename ' option, PRINT SCRIPT sends its output to the specified file instead of standard output. |
Printing a Script to a File: Example The following example prints a script to the file '/tmp/backup_db.rman
':
PRINT SCRIPT backup_db TO FILE '/tmp/backup_db.rman';
Printing a Script to the Screen: Example This example prints a stored script to standard output (includes sample output):
RMAN> PRINT SCRIPT 'backup_db'; printing stored script: backup_db { ALLOCATE CHANNEL c1 DEVICE TYPE sbt BACKUP DATABASE; }