Oracle® Database Backup and Recovery Reference 10g Release 2 (10.2) Part Number B14194-03 |
|
|
View PDF |
Syntax
printScript::=
Purpose
To print a local or global stored script to standard output or to a file.
For more information about stored scripts, see "CREATE SCRIPT".
Restrictions and Usage Notes
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.
Keywords and Parameters
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. |
Examples
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; }