Oracle下如何用rman备份到特定的sequence

本文为摘抄,目的为方便日后阅读:

http://docs.oracle.com/cd/B12037_01/server.101/b10734/rcmbackp.htm

To determine the archived logs needed for recovery of an online backup:

Start SQL*Plus and archive all unarchived logs, including the current log:
SQL> ALTER SYSTEM ARCHIVE LOG CURRENT;

Query V$LOG to determine the log sequence number of the current redo log, as in the following example (which includes output):
SQL> SELECT SEQUENCE# FROM V$LOG WHERE STATUS = 'CURRENT';

SEQUENCE#
----------
9100

Start RMAN and make an online backup of the database. For example, enter:
RMAN> BACKUP DATABASE;

Archive all unarchived logs, including the current log:
RMAN> SQL 'ALTER SYSTEM ARCHIVE LOG CURRENT';

In SQL*Plus, query V$LOG to determine the log sequence number of the current redo log:
SQL> SELECT SEQUENCE# FROM V$LOG WHERE STATUS = 'CURRENT';

SEQUENCE#
----------
9112

Back up the logs beginning with the first sequence number that you queried, and ending with the last sequence number minus 1. The log before the current log is the most recent archived log. For example, if the first query returned 9100, then start at 9100. If the second query returned 9112, then end at 9111.

For example, issue the following to back up the necessary archived logs:

RMAN> BACKUP ARCHIVELOG FROM SEQUENCE 9100 UNTIL SEQUENCE 9111;

  • 0
    点赞
  • 0
    收藏
    觉得还不错? 一键收藏
  • 0
    评论
评论
添加红包

请填写红包祝福语或标题

红包个数最小为10个

红包金额最低5元

当前余额3.43前往充值 >
需支付:10.00
成就一亿技术人!
领取后你会自动成为博主和红包主的粉丝 规则
hope_wisdom
发出的红包
实付
使用余额支付
点击重新获取
扫码支付
钱包余额 0

抵扣说明:

1.余额是钱包充值的虚拟货币,按照1:1的比例进行支付金额的抵扣。
2.余额无法直接购买下载,可以购买VIP、付费专栏及课程。

余额充值