Thinking Out Loud

August 17, 2018

RMAN Commands

Filed under: RMAN — mdinh @ 5:21 am
Note to self to configure and clear settings for all things RMAN.

Will add more as time goes by.

catalog start with '/u01/app/oracle/backup/' noprompt;
catalog backuppiece '/u01/app/oracle/backup/HAWK_3241949199_20180816_bctand12_1_1.bkp';

++++ Remove summary to get full details.
list backup of archivelog all summary completed after 'sysdate-1';
list backup of archivelog from sequence 243 summary;
list backup summary completed after 'sysdate-1';
list backup of controlfile summary tag=STBY;
list backup of controlfile summary;
list backup of spfile summary;
list backup by file;

backup incremental level 0 check logical database filesperset 1 tag=LEVEL0 plus archivelog filesperset 8 tag=LEVEL0;
backup current controlfile for standby tag=STBY;
backup recovery area to destination '/oradata/backup' not backed up;

+++ Remove preview/validate/summary for actual restore.
restore controlfile validate from tag=STBY;
restore controlfile validate preview summary from tag=STBY; (Error if insufficient backup)
restore spfile validate preview summary;
restore database validate;
restore database validate preview summary;
restore database until time "TRUNC(sysdate)+17/24" validate preview summary;

delete force noprompt archivelog until time 'sysdate-3/24';

configure controlfile autobackup on;
configure controlfile autobackup clear;

configure controlfile autobackup format for device type disk to '/media/swrepo/backup/%d_%i_%f.ctl';
configure controlfile autobackup format for device type disk clear;

configure device type disk backup type to compressed backupset parallelism 2;
configure device type disk clear;

configure channel device type disk format '/media/swrepo/backup/%d_%i_%t_%u.bkp' maxpiecesize 1g maxopenfiles 1;
configure channel device type disk clear;

configure archivelog deletion policy to SHIPPED TO ALL standby backed up 1 times to disk;
configure archivelog deletion policy to APPLIED ON ALL standby backed up 1 times to disk;

configure archivelog deletion policy to backed up 1 times to disk SHIPPED TO ALL STANDBY;
configure archivelog deletion policy to backed up 1 times to disk APPLIED ON ALL STANDBY;

configure archivelog deletion policy CLEAR;

configure db_unique_name 'hawka' connect identifier 'hawka';
configure db_unique_name 'hawka' CLEAR;
Advertisements

1 Comment »

  1. Using a lot of best people playing incredibly strongly today,
    this principle is just a touch harder to-use successfully.

    Comment by Azucena — October 22, 2018 @ 11:38 am | Reply


RSS feed for comments on this post. TrackBack URI

Leave a Reply

Fill in your details below or click an icon to log in:

WordPress.com Logo

You are commenting using your WordPress.com account. Log Out /  Change )

Google+ photo

You are commenting using your Google+ account. Log Out /  Change )

Twitter picture

You are commenting using your Twitter account. Log Out /  Change )

Facebook photo

You are commenting using your Facebook account. Log Out /  Change )

Connecting to %s

This site uses Akismet to reduce spam. Learn how your comment data is processed.

Blog at WordPress.com.

%d bloggers like this: