RMAN

Recovery Manager commands.

  BACKUP     Back up database files, archive logs, backups, or copies.
  CATALOG    Add information about files to the repository. (10g+)
  CHANGE     Update the status of a backup in the RMAN repository.
  CONFIGURE  Persistent RMAN settings.
  CONNECT    Connect to a recovery catalog or auxiliary database
  CROSSCHECK Check whether backup items still exist.
  DELETE     Delete backups from disk or tape
  EXIT       Exit the RMAN console
  LIST       List backups and copies
  RECOVER    Apply redo logs or incremental backups to a restored backup set
              (or copy) in order to update it to a specified time. 
  REPORT     Report backup status: database, files, backups
  RESTORE    Restore files from an RMAN backup (or copy)
  RUN        Some RMAN commands are only valid inside a RUN block.
  SET        Settings for the current RMAN session.
  SHOW       Display the current configuration
  SHUTDOWN   Shutdown the database
  SQL        Execute a PL/SQL procedure or SQL statement(not SELECT)
  STARTUP    Startup the database

  ADVISE FAILURE  Display repair options (11g Data Recovery Advisor)
  REPAIR FAILURE  Repair database failures (11g Data Recovery Advisor)

Examples: Full DR recovery, Point in time recovery (assumes archive log mode)

Syntax:

Start RMAN without connecting to a database

 $ rman

Start RMAN and run a command file:

 $ rman @/scripts/rman_commands.txt  

Connect to a target database and a recovery catalog:

 $ rman TARGET SYS/pwd CATALOG cat_usr/pwd@cat_str

Connect to a target database without using a recovery catalog:

 $ rman TARGET SYS/pwd@sid NOCATALOG

Connect to a target database and log a full debug trace file:

 $ rman TARGET SYS/pwd NOCATALOG debug trace=rman.trc log=rman.log

Connect to a target database and log output messages to a file:

 $ rman TARGET SYS/pwd log=rman.log APPEND

Run a command file from the RMAN prompt:

RMAN> @/my_dir/my_command_file.txt

In interactive mode, RMAN displays an "RMAN>"> prompt
The commands above can be entered directly at the RMAN> prompt or used within a command file. To quit, type EXIT
RMAN records it's backup activity in the database control file.

Optional Components of RMAN:

The recovery catalog database, a separate database used to record RMAN activity against one or more target databases. RMAN's LIST, REPORT, and SHOW commands display information from this repository. It is also possible for one database to store both the RMAN repository and other data. Typically this would be a Test or Train instance (with the repository data in a separate RMAN schema.)

The flash recovery area, a disk location in which the database can store and manage files related to backup and recovery.

Media management software, for interface with tape drives/libraries.

Initialization Parameters

Set the flash recovery area size and location, using DB_RECOVERY_FILE_DEST and DB_RECOVERY_FILE_DEST_SIZE.

CONTROL_FILE_RECORD_KEEP_TIME controls how long backup records are kept in the control file before those records are re-used to hold information about more recent backups.

Versions
For simplicity the syntax on this page does not cover every command available; it is based on commands that are common to both Oracle 9.2 and Oracle 10g (10.1) 10g has greatly improved RMAN data dictionary views for reporting.
RMAN was first introduced in Oracle 8.0

"We don't want to go back to tomorrow, we want to go.. forward" - Dan Quale

Related Views:

  RC_DATABASE               V$DATABASE
  RC_DATABASE_INCARNATION   V$DATABASE_INCARNATION

 
Copyright © 1999-2024 SS64.com
Some rights reserved