ON CALL DBA SUPPORT

— Database blog

Archive for the ‘RMAN’ Category

QUERY TO FIND THE % COMPLETION WHILE EXECUTING

Posted by ssgottik on 16/04/2014

SELECT s.sid,  s.serial#,  s.machine,s.sql_id,
TRUNC(sl.elapsed_seconds/60) || ‘:’ || MOD(sl.elapsed_seconds,60) elapsed,
TRUNC(sl.time_remaining/60) || ‘:’ || MOD(sl.time_remaining,60) remaining,
ROUND(sl.sofar/sl.totalwork*100, 2) progress_pct
FROM   v$session s, v$session_longops sl
WHERE  s.sid     = sl.sid
AND    s.serial# = sl.serial#;

Advertisements

Posted in RMAN, SCRIPTS | Leave a Comment »

RMAN BACKUP MEDIA ID /TAPE ID

Posted by ssgottik on 16/04/2014

select   to_char(bu.completion_time, ‘YYYY-MM-DD HH24:MI’) as completion_time,bu.media as media_id      
from v$backup_piece bu
where   to_char( bu.completion_time , ‘MM-DD-YYYY’)= ‘mm-dd-yyyy’   
order by 1 desc

Posted in RMAN, SCRIPTS | Leave a Comment »

RMAN-06059: expected archived log not found

Posted by ssgottik on 17/06/2011

RMAN-06059: expected archived log not found while taking archive log backup

 RMAN-00571: ===========================================================

RMAN-00569: =============== ERROR MESSAGE STACK FOLLOWS ===============

RMAN-00571: ===========================================================

RMAN-03002: failure of backup command at 06/16/2011 06:02:47

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

ORA-19625: error identifying file /arch/db/dwprod/arch_ORCL_533835433_1_145891.arc

ORA-27037: unable to obtain file status

HPUX-ia64 Error: 2: No such file or directory

Additional information: 3

The possible reason for the above error is that recovery catalog may be out of synch or that particular archivelog got deleted.

How to overcome this?

CASE1: If the recovery catalog is out of synch:

ORCL: oracle] $rman target sys/***** catalog rman/******@RCCATALOG

Recovery Manager: Release 11.2.0.2.0 – Production on Thu Jun 16 13:19:23 2011

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

Connected to target database: ORCL (DBID=3983796265)

Connected to recovery catalog database

RMAN>SQL “ALTER SYSTEM ARCHIVE LOG CURRENT”;

sql statement: ALTER SYSTEM ARCHIVE LOG CURRENT

RMAN>RESYNC CATALOG;

starting full resync of recovery catalog

full resync complete

CASE2: IF THE ARCHIVE LOG IS DELETED:

ORCL:oracle]$rman target sys/***** catalog rman/******@RCCATALOG

RMAN>crosscheck copy of archivelog all;

Once the crosscheck command is executed successfully, we have to take the full backup of the database.

Thanks and Regards,

Satish.G.S

 

 

Posted in RMAN | 3 Comments »