Quick Search:
Oracle PL/SQL Code Library
Find Or Post Oracle Jobs
Oracle Discussion & Chat
 Oracle PL/SQL: RMAN (Oracle Recovery Manager) Jump to:  
Category: >> Oracle PL/SQL >> RMAN (Oracle Recovery Manager) Bookmark and Share

<< lastnext >>

Snippet Name: RMAN (Oracle Recovery Manager)

Description: Recovery Manager (or RMAN) is an Oracle provided utility for backing-up, restoring and recovering Oracle Databases. RMAN ships with the database server and doesn't require a separate installation. The RMAN executable is located in your ORACLE_HOME/bin directory. You can connect it to a target database, and then use server sessions on the target database to back up, restore, and recover files.

Also see:
» RMAN: List the most recent Level 0 bac...
» RMAN: Format Directives
» RMAN: Command Summary
» RMAN: Data Dictionary Objects

Comment: (none)

Language: PL/SQL
Highlight Mode: PLSQL
Last Modified: March 10th, 2009

-- starting RMAN:
-- Specify the database connection information at the command line:
    rman TARGET SYS/target_pwd@target_str # connects IN NOCATALOG MODE
    rman TARGET / CATALOG rman/rman@rcat
    rman TARGET / CATALOG rman/rman@rcat AUXILIARY sys/aux_pwd@aux_str
-- Omit the database connection at the command line, and use the 
-- CONNECT command in your RMAN scripts:
RMAN> run {
  SET until TIME TO_DATE('04-Aug-2008 00:00:00', 'DD-MON-YYYY HH24:MI:SS');
  restore database;
  recover database;
RMAN can be operated from Oracle Enterprise Manager, or 
from command line. Here are the command line arguments:
Argument     Value          Description
target       quoted-string  connect-string for target database
catalog      quoted-string  connect-string for recovery catalog
nocatalog    none           if specified, then no recovery catalog
cmdfile      quoted-string  name of input command file
log          quoted-string  name of output message log file
trace        quoted-string  name of output debugging message log file
append       none           if specified, log is opened in append mode
debug        optional-args  activate debugging
msgno        none           show RMAN-nnnn prefix for all messages
send         quoted-string  send a command to the media manager
pipe         string         building block for pipe names
timeout      integer        number of seconds to wait for pipe input
-- for example: 
connected TO target database: ORCL (DBID=1058957020)
RMAN> backup database;
-- simple backup example: 
rman target sys/*** nocatalog 
run { 
  allocate channel t1 type disk;
    format '/app/oracle/backup/%d_t%t_s%s_p%p'
   release channel t1; 
-- example RMAN restore: 
rman target sys/*** nocatalog 
run {
  allocate channel t1 type disk;
  # set until time 'Aug 07 2000 :51';
  restore tablespace users; 
  recover tablespace users; 
  release channel t1; 

Oracle Magazine
and Oracle White Papers

SQL University.net courses meet the most demanding needs of the business world for advanced education in a cost-effective manner. SQL University.net courses are available immediately for IT professionals and can be taken without disruption of your workplace schedule or processes.

Compared to traditional travel-based training, SQL University.net saves time and valuable corporate resources, allowing companies to do more with less. That's our mission, and that's what we deliver.

Click here to find out more
Home      :      Code Library      :      Sponsors      :      Privacy      :      Terms of Use      :      Contact Us 19 users online    © 2009 psoug.org

Forgot your password?