1. Considerations for using RMAN
Resources: Shared Memory, more processes
Permission: grant sysdba permission and OS permission to access devices.
Remote Operation
Set Password File
Make sure the password file is backed up
Global Environment variable settings
Format the time parameter in the RMAN command line
2. Connection Type
Target Database
Restore the directory database. By default, RMAN runs in a non-recovered directory database.
Secondary Database
Standby Database
Duplicate Database
Tspitr instance
4. connect to the target database or restore the Directory
-- Start RMAN only if the database is not connected
[Oracle @ oradb ~] $ RMAN
-- Connect to the target database using operating system authentication
UNIX: $ oracle_sid = orcl; export oracle_sid
$ RMAN target/
Win: C:/> set oracle_sid = orcl
C:/> RMAN target/
-- Connect to the target database from the command line and restore the Directory
% RMAN target/catalog rman/CAT @ catdb -- use OS authentication. The second RMAN is the schema of the recovery directory.
% RMAN target sys/Oracle @ trgt catalog RMAN/CAT @ catdb -- use Oracle Net for authentication
-- Connect to the target database and restore the directory from the RMAN prompt
% RMAN
RMAN> connect target/-- use OS Authentication
RMAN> connect catalog RMAN/CAT @ catdb
% RMAN
RMAN> connect target sys/Oracle @ trgt -- use Oracle Net for authentication
RMAN> connect catalog RMAN/CAT @ catdb
-- Connect the command line to the secondary Database
% RMAN auxiliary sys/aux @ auxdb
% RMAN target sys/Oracle @ trgt auxiliary sys/aux @ auxdb catrman RMAN/CAT @ catdb
-- Connect to the secondary database from the RMAN prompt
% RMAN
RMAN> connect auxiliary sys/aux @ auxdb
% RMAN
RMAN> connect target sys/Oracle @ trgt
RMAN> connect catalog RMAN/CAT @ catdb
RMAN> connect auxiliary sys/aux @ auxdb
-- Others
Remote connection
RMAN target sys/Oracle @ trgt
RMAN target/nocatalog is equivalent to RMAN target/
-- RMAN command line parameters
Output to log file
$ RMAN target sys/Oracle
Log = $ oralce_home/oradata/log/RMAN. Log append
Execute the name file
$ RMAN target sys/Oracle
Export File = $ ORACLE_HOME/scirpts/my_rman_script.rcv
$ RMAN target sys/Oracle @ prod @ '$ ORACLE_HOME/scirpts/my_rman_script.rcv'