Friday, 23 October 2015

How to find the last RMAN backup’s log?

set pagesize 2000
set linesize 2000
select
output
from
GV$RMAN_OUTPUT
where
session_recid =
(
select
session_recid
from
V$RMAN_BACKUP_JOB_DETAILS
where
session_key=(select max(session_key) from v$RMAN_BACKUP_JOB_DETAILS)
);


OUTPUT
----------------------------------------------------------------------------------------------------------------------------------
connected to target database: TEST (DBID=3221280546)
connected to recovery catalog database


allocated channel: ORA_DISK_1
channel ORA_DISK_1: sid=2817 devtype=DISK
validation succeeded for archived log
archive log filename=/data/TEST/arch/TEST1_1243_891780004.arc recid=2465 stamp=893720321
validation succeeded for archived log
archive log filename=/backup/data/TEST/arch/TEST1_1243_891780004.arc recid=2466 stamp=893720321
validation succeeded for archived log
archive log filename=/data/TEST/arch/TEST1_1244_891780004.arc recid=2467 stamp=893720321
validation succeeded for archived log
archive log filename=/backup/data/TEST/arch/TEST1_1244_891780004.arc recid=2468 stamp=893720321
validation succeeded for archived log
archive log filename=/data/TEST/arch/TEST1_1245_891780004.arc recid=2469 stamp=893720326
validation succeeded for archived log
archive log filename=/backup/data/TEST/arch/TEST1_1245_891780004.arc recid=2470 stamp=893720326
validation succeeded for archived log
archive log filename=/data/TEST/arch/TEST1_1246_891780004.arc recid=2471 stamp=893720326
validation succeeded for archived log
archive log filename=/backup/data/TEST/arch/TEST1_1246_891780004.arc recid=2472 stamp=893720326
validation succeeded for archived log
archive log filename=/data/TEST/arch/TEST1_1247_891780004.arc recid=2475 stamp=893720329
validation succeeded for archived log
archive log filename=/backup/data/TEST/arch/TEST1_1247_891780004.arc recid=2476 stamp=893720329
validation succeeded for archived log
archive log filename=/data/TEST/arch/TEST1_1248_891780004.arc recid=2473 stamp=893720329
validation succeeded for archived log
archive log filename=/backup/data/TEST/arch/TEST1_1248_891780004.arc recid=2474 stamp=893720329
archive log filename=/backup/data/TEST/arch/TEST1_1251_891780004.arc recid=2482 stamp=893722157
validation succeeded for archived log
archive log filename=/data/TEST/arch/TEST1_1252_891780004.arc recid=2483 stamp=893723957
validation succeeded for archived log
archive log filename=/backup/data/TEST/arch/TEST1_1252_891780004.arc recid=2484 stamp=893723957
validation succeeded for archived log
archive log filename=/data/TEST/arch/TEST1_1253_891780004.arc recid=2485 stamp=893725758
validation succeeded for archived log
archive log filename=/backup/data/TEST/arch/TEST1_1253_891780004.arc recid=2486 stamp=893725758
validation succeeded for archived log
archive log filename=/data/TEST/arch/TEST1_1254_891780004.arc recid=2487 stamp=893727558
validation succeeded for archived log
archive log filename=/backup/data/TEST/arch/TEST1_1254_891780004.arc recid=2488 stamp=893727558
.
.
.
input archive log thread=1 sequence=1305 recid=2589 stamp=893806765
channel CH1: starting piece 1 at 22-OCT-15
channel CH1: finished piece 1 at 22-OCT-15
piece handle=/backup/data/TEST/rman_backup/arch/FULL_TEST_1_5nqkcq6k_1_1 tag=TAG20151022T234001 comment=NONE
channel CH1: backup set complete, elapsed time: 00:00:01
Finished backup at 22-OCT-15
released channel: CH1
released channel: CH2
released channel: CH3



967 rows selected.




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

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

No comments:

Post a Comment