Skip to content

RMAN PRINT SCRIPT

    RMAN PRINT SCRIPT command is used to print a local or global stored script to standard output or to a file.

    Prerequisites

    Execute PRINT SCRIPT only at the RMAN prompt. RMAN must be connected to a target database and a recovery catalog. The recovery catalog database must be open.

    If the specified script is a local script, then RMAN must be connected to the target database that it was connected to when you created or replaced the script.

    Note

    If GLOBAL is not specified, then RMAN looks for a local or global script script_name to print. If a local script is found, then it is printed. If no local script is found, but a global script script_name is found, then the global script is printed.

    Print Script to a File

    This example prints a script to the file /tmp/global_backup_db.rman:

    RMAN> PRINT GLOBAL SCRIPT global_backup_db TO FILE "/tmp/global_backup_db.rman";

    Print Script to the Screen

    This example prints a stored script to standard output :

    RMAN> PRINT SCRIPT backup_whole;
     
    printing stored script: backup_whole
    {
        BACKUP
          INCREMENTAL LEVEL 0 TAG backup_whole
          FORMAT "/disk2/backup/%U"
          DATABASE PLUS ARCHIVELOG;
    }

    Also See:

    RMAN SCRIPT command

    Oracle RMAN