Showing posts with label RMAN. Show all posts
Showing posts with label RMAN. Show all posts

Thursday 19 February 2015

RMAN-06059: expected archived log not found, loss of archived log compromises recoverability

While RMAN full backup, you may encountered “RMAN-06059: expected archived log not found, loss of archived log compromises recoverability”

Error log:

[oracle@NVMBD1BZY150D00 ~]$ rman target / cmdfile=bkp_inc_lev0.rcv

Recovery Manager: Release 11.2.0.3.0 - Production on Fri Feb 20 12:31:30 2015

Copyright (c) 1982, 2011, Oracle and/or its affiliates.  All rights reserved.

connected to target database: CLONEDB (DBID=958582256)

RMAN> run
2> {
3> backup incremental level 0 database tag "level 0 "  plus archivelog delete input tag "ARCHIVE BACKUP";
4> }
5>
6>

Starting backup at 20-FEB-15
current log archived
using target database control file instead of recovery catalog
allocated channel: ORA_DISK_1
channel ORA_DISK_1: SID=176 device type=DISK
RMAN-00571: ===========================================================
RMAN-00569: =============== ERROR MESSAGE STACK FOLLOWS ===============
RMAN-00571: ===========================================================
RMAN-03002: failure of backup plus archivelog command at 02/20/2015 12:31:31
RMAN-06059: expected archived log not found, loss of archived log compromises recoverability
ORA-19625: error identifying file /data1/clonedb/archive/1_50_872092231.dbf
ORA-27037: unable to obtain file status
Linux-x86_64 Error: 2: No such file or directory
Additional information: 3

Recovery Manager complete.



Cause:

This can happen for a variety of reasons; the file has been manually moved or deleted,
the archive log destination has recently been changed,
the file has been compressed, etc

Solution:

Your options are either to restore the missing file(s), or to perform a crosscheck.
To perform a crosscheck, run the following command from within RMAN:

RMAN> CROSSCHECK ARCHIVELOG ALL;

Above command will give information of expired RMAN repository after verification. (i.e. in catalog or controlfile)

Above will marked archives as Expired who are not available physically and who are not required for any kind of recovery.

RMAN> DELETE EXPIRED ARCHIVELOG ALL;

Above command will delete all archive logs who are marked as expired while crosscheck.





I hope this article helped you. Your suggestions/feedback are most welcome.

Keep learning... Have a great day!!!

Monday 13 October 2014

DROP DATABASE INCLUDING RMAN BACKUPS IN ORACLE



Example - Deleting a Database

In this example, you want to delete a test database called
test1 that is registered in the recovery catalog. You start the RMAN client, connect to database test1 as TARGET, and connect to the recovery catalog. You then run the following commands to delete the target database files, as well as all backups, copies, and archived logs associated with the database:
RMAN> CONNECT TARGET SYS@test1

target database Password: password
connected to target database: TEST1 (DBID=3952556153453)

RMAN> STARTUP FORCE MOUNT

RMAN> SQL 'ALTER SYSTEM ENABLE RESTRICTED SESSION';

RMAN> DROP DATABASE INCLUDING BACKUPS NOPROMPT;


I hope this article helped you. Your suggestions/feedback are most welcome.
Keep learning... Have a great day!!!


Friday 12 September 2014

RMAN Command cheat sheet




RMAN> list backupset;
RMAN> list backupset of database;
RMAN> list backupset of database completed before '22-NOV-00';
RMAN> list backupset of archivelog all;
RMAN> list backupset of tablespace users;
RMAN> list backupset of datafile 1;

RMAN> list backup summary;
RMAN> list backup;
RMAN> list backup of controlfile;
RMAN> list backup of tablespace SYSTEM;
RMAN> list backup by file;
RMAN> list backup of archivelog all ;

RMAN> list copy of database;
RMAN> list copy of database archivelog all;

RMAN> allocate channel for maintenance type disk;
RMAN> configure channel device type disk clear ;

RMAN> report need backup days=2 database;
RMAN> report need backup days=10 tablespace TEMP;
RMAN> report need backup days=4 datafile 'D:\ORACLE\ORADATA\OR816\TEMP01.DBF';
RMAN> report schema;
RMAN> report obsolete;

RMAN> crosscheck backup;
RMAN> crosscheck backupset;
RMAN> crosscheck copy;
RMAN> crosscheck archivelog all;
RMAN> crosscheck controlfilecopy '/ora01/oracle/admin/BACKUP/demo/demo_controlfile_bak_03-15-11_19:59:11' ;

RMAN> delete noprompt expired backup ;
RMAN> delete noprompt obsolete;
RMAN> delete archivelog all;
RMAN> delete expired archivelog all;
RMAN> delete archivelog all completed before 'sysdate -1';
RMAN> delete noprompt archivelog until time 'sysdate - 1';
RMAN> delete archivelog all backed up 1 times to device type disk completed before 'sysdate-1';


I hope this article helped you. Your suggestions/feedback are most welcome.

Keep learning... Have a great day!!!