Total Pageviews

Wednesday 27 July 2016

RMAN Recovery Script

col "Restore Command" for a100 col "Applied Logs" for a100 col "Catalog Logs" for a100 col "Recover Command" for a80 select ' restore archivelog from logseq ' || applied_arc.startNo ||
' until logseq ' || catalog_arc.endNo || ' thread=' ||
catalog_arc.thread# || ';' "Restore Command" from --(select thread#,max(sequence#) + 1 startNo from gv$archived_log
where applied='YES' group by thread#) applied_arc, (select thread#,max(sequence#) startNo from gv$archived_log where
applied='YES' group by thread#) applied_arc, (select thread#, max(sequence#) endNo from v$backup_archivelog_details
group by thread#) catalog_arc where applied_arc.thread# = catalog_arc.thread#; prompt '=========== Archive Log Info =============' select distinct 'Thread ' || thread# || ': last applied archive log '
|| sequence# || ' at ' || to_char(next_time, 'MON/DD/YYYY HH24:MI:SS')
|| ' next change# ' || next_change# "Applied Logs" from v$archived_log where thread# || '_' || sequence# in (select thread# || '_' || max(sequence#) from v$archived_log where
applied='YES' group by thread#) --and applied='YES' ; select 'Thread ' || thread# || ': last cataloged archive log '
|| sequence# || ' at ' || to_char(next_time, 'MON/DD/YYYY HH24:MI:SS')
|| ' next change# ' || next_change# "Catalog Logs" from v$backup_archivelog_details where thread# || '_' || sequence# in (select thread# || '_' || max(sequence#) from
v$backup_archivelog_details group by thread#) ; prompt '=========== recover point ================' --select 'recover database until sequence ' || seq# || ' thread '
|| thread# || ' delete archivelog maxsize 4000g; ' Content select 'set until sequence ' || seq# || ' thread ' || thread#
|| '; ' || chr(13)|| chr(10) || 'recover database
delete archivelog maxsize 4000g; ' "Recover Command" from ( select * from ( select thread#, sequence# + 1 seq#, next_change# from ( select * from v$backup_archivelog_details where thread# || '_' || sequence# in (select thread# || '_' || max(sequence#) from
v$backup_archivelog_details group by thread#) ) order by next_change# ) where rownum = 1 ) ; https://weidongzhou.wordpress.com/2014/09/20/
script-to-identify-the-restore-and-recover-point-for-archive-logs/

2 comments:

  1. Jadwal Pertandingan Ayam SV388 7 Maret 2019 - Jumat, Lombok 8 Maret 2019 – Pada Hari Tersebut Akan Di Laksanakan Berbagai Pertandingan Sabung Ayam Secara Live di Arena Sabung Ayam Thailand.

    Situs Judi Sabung Ayam Online SV388 Merupakan Situs Judi Asal Thailand Yang Sangat Terkenal Dengan Permainan Sabung Ayam Yang Fair dan Menghibur Para Penonton Judi Sabung Ayam.

    Untuk Info Lebih Lanjut Bisa Hub kami Di :
    wechat : bolavita
    line : cs_bolavita
    whatsapp : +628122222995
    BBM: BOLAVITA

    ReplyDelete
  2. Hello Everybody,
    My name is Mrs Sharon Sim. I live in Singapore and i am a happy woman today? and i told my self that any lender that rescue my family from our poor situation, i will refer any person that is looking for loan to him, he gave me happiness to me and my family, i was in need of a loan of $250,000.00 to start my life all over as i am a single mother with 3 kids I met this honest and GOD fearing man loan lender that help me with a loan of $250,000.00 SG. Dollar, he is a GOD fearing man, if you are in need of loan and you will pay back the loan please contact him tell him that is Mrs Sharon, that refer you to him. contact Dr Purva Pius, call/whats-App Contact Number +918929509036 via email:(urgentloan22@gmail.com) Thank you.

    ReplyDelete