Skip Headers

Oracle9i Recovery Manager Reference
Release 2 (9.2)

Part Number A96565-01
Go To Documentation Library
Home
Go To Product List
Book List
Go To Table Of Contents
Contents
Go To Index
Index

Master Index

Feedback

Go to previous page Go to beginning of chapter Go to next page

RMAN Commands , 36 of 59


PRINT SCRIPT

Syntax

Text description of printScript.gif follows
Text description of the illustration printScript.gif


Purpose

To print a stored script to standard output or the RMAN message log. To print to a message log, specify the log filename with the LOG argument at the command line. If you do not specify this argument, Recovery Manager writes message output to standard output.


Note:

You can also display the individual lines of the stored scripts by querying the RC_STORED_SCRIPT_LINE recovery catalog view.


Restrictions and Usage Notes

Keywords and Parameters

Syntax Element Description

'script_name'

Prints a stored script with the specified name to standard output or a message log. To obtain a listing of all stored scripts, use SQL*Plus connect to the recovery catalog as the catalog owner and issue the following query:

SQL> SELECT * FROM RC_STORED_SCRIPT;

Note: To run the script, use EXECUTE SCRIPT within the braces of the RUN command.

See Also: "RC_STORED_SCRIPT"

Examples

Printing a Script to the Message Log: Example

The following shell script creates the backup_db recovery catalog script and prints it to rman_log. Finally, it executes the script:

#!/usr/bin/tcsh
rman TARGET / CATALOG rman/rman@rcatdb LOG = rman_log <<EOF
REPLACE SCRIPT backup_db 
{
  ALLOCATE CHANNEL c1 DEVICE TYPE sbt;
  BACKUP DATABASE;
}
PRINT SCRIPT backup_db;
RUN
{ 
  EXECUTE SCRIPT backup_db;
}
EOF
Printing a Script to the Screen: Example

This example prints a stored script to standard output (includes sample output):

PRINT SCRIPT backup_db;

printing stored script: backup_db
{
ALLOCATE CHANNEL c1 DEVICE TYPE sbt
BACKUP DATABASE;
}

Go to previous page Go to beginning of chapter Go to next page
Oracle
Copyright © 1996, 2002 Oracle Corporation.

All Rights Reserved.
Go To Documentation Library
Home
Go To Product List
Book List
Go To Table Of Contents
Contents
Go To Index
Index

Master Index

Feedback