Chinaunix首页 | 论坛 | 博客
  • 博客访问: 1365175
  • 博文数量: 416
  • 博客积分: 10495
  • 博客等级: 上将
  • 技术积分: 4258
  • 用 户 组: 普通用户
  • 注册时间: 2005-04-23 22:13
文章分类

全部博文(416)

文章存档

2015年(7)

2014年(42)

2013年(35)

2012年(14)

2011年(17)

2010年(10)

2009年(18)

2008年(127)

2007年(72)

2006年(23)

2005年(51)

分类: Oracle

2007-04-09 11:02:03

RMAN

Recovery Manager commands.

       Back up database files, archive logs, backups, or copies.
Update the status of a backup in the RMAN repository.
Persistent RMAN settings.
Check whether backup items still exist.
Delete backups from disk or tape
EXIT Exit the RMAN console
List backups and copies
Apply redo logs or incremental backups to a restored backup set
(or copy) in order to update it to a specified time.
Report backup status: database, files, backups
Restore files from an RMAN backup (or copy)
Some RMAN commands are only valid inside a RUN block.
Settings for the current RMAN session.
Display the current configuration
Shutdown the database
SQL Execute a PL/SQL procedure or SQL statement(not SELECT)
Startup the database

Syntax:
Start RMAN without connecting to a database
% rman

Start RMAN with a command file to run
% rman @/my_dir/my_commands.txt

Connect to a target database without using a recovery catalog:
% rman TARGET SYS/pwd@target_str

Connect to a target database and export to a log file
% rman TARGET SYS/pwd@target_str LOG $ORACLE_HOME/dbs/log/my_log.log APPEND

Connect to a target database and a recovery catalog:
% rman TARGET SYS/pwd@target_str CATALOG cat_usr/pwd@cat_str

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 may 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 , , and 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             
 RC_DATABASE_INCARNATION V$DATABASE_INCARNATION

Equivalent SQL Server command:

阅读(2553) | 评论(0) | 转发(0) |
给主人留下些什么吧!~~