Executing RMAN Commandsfrom the RMAN Prompt
The most basic way of executing RMAN commands is to type them in manually from the RMAN command-line prompt. In fact, we recommend that you become familiar with this method. There are two good reasons for learning how to type in commands manually:
Concepts are reenforced.
It may be the only option available during a backup and recovery scenario.
In other words, don’t rely on a tool for backup and recovery if you don’t understand the underlying command syntax. You don’t want to be caught in a situation in which you’re responsible for a recovery but do not know how to compose ad hoc RMAN commands. Here’s a simple example of how to do a full disk-based backup of datafiles by typing in the commands manually:
$rman nocatalogRecovery Manager: Release 9.0.1.0.0 - Production RMAN>connect target /connected to target database: BRDSTN (DBID=3662736385) using target database controlfile instead of recovery catalog RMAN>run {allocate channel d1 type disk;2>backup full format '/ora01/backup/rman_%d_%U.bus'3>database;}
This performs a full database backup of datafiles to a local disk in the /ora01/backup directory.
The target must be in archivelog mode before running an on-line backup. Here’s an example of how to alter a database into archivelog mode:
SQL>connect sys/heeraa as sysdba;SQL>alter database archivelog;
Even when simple tasks complete successfully, RMAN presents you with a voluminous information stack. When typing in commands manually, ...
Become an O’Reilly member and get unlimited access to this title plus top books and audiobooks from O’Reilly and nearly 200 top publishers, thousands of courses curated by job role, 150+ live events each month,
and much more.
Read now
Unlock full access