Oracle9i Recovery Manager Reference
Release 1 (9.0.1)

Part Number A90136-02
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 60


PRINT SCRIPT

Syntax


Text description of printscr.gif follows
Text description of the illustration printscr.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

'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

This example creates the backup_db script and prints it to rman_log. Finally, it executes the script:

% rman TARGET / CATALOG rman/rman@rcatdb LOG = rman_log

CREATE SCRIPT backup_db {
       ALLOCATE CHANNEL d1 DEVICE TYPE sbt;
       BACKUP DATABASE;
}
PRINT SCRIPT backup_db;

RUN
{ 
  EXECUTE SCRIPT backup_db;
};

Printing a Script to the Screen: Example

This example prints a stored script to the screen:

PRINT SCRIPT tbs1_b;

printing stored script: tbs1_b
{
allocate channel ch1 type disk;
backup tablespace tbs1;
}

Go to previous page Go to beginning of chapter Go to next page
Oracle
Copyright © 1996-2001, 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