Suppose you are taking your database backup while it is open. And users are doing normal activities on it. Now, you want to back up only those archived redo logs required to recover this online backup.
In this case you have two solutions.
1)The recommended solution is run the backup as,
RMAN> BACKUP DATABASE PLUS ARCHIVELOG;
2)You can also manually determine which archived logs are required and back them up, using the following procedure.
i)In SQL*plus archive all unarchived logs, including the current log:
SQL> ALTER SYSTEM ARCHIVE LOG CURRENT;
ii)Determine the log sequence number of the current redo log,
SQL> SELECT SEQUENCE# FROM V$LOG WHERE STATUS = 'CURRENT';
SEQUENCE#
----------
10
iii)Backup database with RMAN.
RMAN>BACKUP DATABASE;
iv)Archive all unarchived logs, including the current log.
RMAN>SQL 'ALTER SYSTEM ARCHIVE LOG CURRENT';
v)Determine the log sequence number of the current redo log.
SQL> SELECT SEQUENCE# FROM V$LOG WHERE STATUS = 'CURRENT';
SEQUENCE#
----------
13
vi)Back up the logs beginning with the first sequence number that you queried, and ending with the last sequence number minus 1.
RMAN>BACKUP ARCHIVELOG FROM SEQUENCE 10 UNTIL SEQUENCE 12;
No comments:
Post a Comment