{"id":285,"date":"2018-01-23T08:39:09","date_gmt":"2018-01-22T22:39:09","guid":{"rendered":"http:\/\/www.mrmarkyoung.com\/oracle\/?p=285"},"modified":"2018-06-04T14:51:38","modified_gmt":"2018-06-04T04:51:38","slug":"archive-log-information","status":"publish","type":"post","link":"http:\/\/www.mrmarkyoung.com\/oracle\/2018\/01\/23\/archive-log-information\/","title":{"rendered":"Archive Log Information"},"content":{"rendered":"\n<pre class=\"lang:default decode:true \" >SELECT    ' restore archivelog from logseq '\r\n       || applied_arc.startNo\r\n       || ' until logseq '\r\n       || catalog_arc.endNo\r\n       || ' thread='\r\n       || catalog_arc.thread#\r\n       || ';'\r\n           \"Restore Command\"\r\n  FROM applied_arc,\r\n       (  SELECT thread#, MAX (sequence#) startNo\r\n            FROM gv$archived_log\r\n           WHERE applied = 'YES'\r\n        GROUP BY thread#) applied_arc,\r\n       (  SELECT thread#, MAX (sequence#) endNo\r\n            FROM v$backup_archivelog_details\r\n        GROUP BY thread#) catalog_arc\r\n WHERE applied_arc.thread# = catalog_arc.thread#;<\/pre>\n<pre class=\"lang:default decode:true \" >SELECT DISTINCT\r\n          'Thread '\r\n       || thread#\r\n       || ': last applied archive log '\r\n       || sequence#\r\n       || ' at '\r\n       || TO_CHAR (next_time, 'MON\/DD\/YYYY HH24:MI:SS')\r\n       || ' next change# '\r\n       || next_change#\r\n           \"Applied Logs\"\r\n  FROM gv$archived_log\r\n WHERE thread# || '_' || sequence# IN\r\n           (  SELECT thread# || '_' || MAX (sequence#)\r\n                FROM gv$archived_log\r\n               WHERE applied = 'YES'\r\n            GROUP BY thread#);<\/pre>\n","protected":false},"excerpt":{"rendered":"<p>SELECT &#8216; restore archivelog from logseq &#8216; || applied_arc.startNo || &#8216; until logseq &#8216; || catalog_arc.endNo || &#8216; thread=&#8217; || catalog_arc.thread# || &#8216;;&#8217; &#8220;Restore Command&#8221; FROM applied_arc, ( SELECT thread#, MAX (sequence#) startNo FROM gv$archived_log WHERE applied = &#8216;YES&#8217; GROUP BY thread#) applied_arc, ( SELECT thread#, MAX (sequence#) endNo FROM v$backup_archivelog_details GROUP BY thread#) catalog_arc &#8230; <a title=\"Archive Log Information\" class=\"read-more\" href=\"http:\/\/www.mrmarkyoung.com\/oracle\/2018\/01\/23\/archive-log-information\/\" aria-label=\"Read more about Archive Log Information\">Read more<\/a><\/p>\n","protected":false},"author":1,"featured_media":0,"comment_status":"open","ping_status":"open","sticky":false,"template":"","format":"standard","meta":{"footnotes":""},"categories":[4],"tags":[9],"class_list":["post-285","post","type-post","status-publish","format-standard","hentry","category-oracle-database","tag-rman"],"_links":{"self":[{"href":"http:\/\/www.mrmarkyoung.com\/oracle\/wp-json\/wp\/v2\/posts\/285","targetHints":{"allow":["GET"]}}],"collection":[{"href":"http:\/\/www.mrmarkyoung.com\/oracle\/wp-json\/wp\/v2\/posts"}],"about":[{"href":"http:\/\/www.mrmarkyoung.com\/oracle\/wp-json\/wp\/v2\/types\/post"}],"author":[{"embeddable":true,"href":"http:\/\/www.mrmarkyoung.com\/oracle\/wp-json\/wp\/v2\/users\/1"}],"replies":[{"embeddable":true,"href":"http:\/\/www.mrmarkyoung.com\/oracle\/wp-json\/wp\/v2\/comments?post=285"}],"version-history":[{"count":2,"href":"http:\/\/www.mrmarkyoung.com\/oracle\/wp-json\/wp\/v2\/posts\/285\/revisions"}],"predecessor-version":[{"id":287,"href":"http:\/\/www.mrmarkyoung.com\/oracle\/wp-json\/wp\/v2\/posts\/285\/revisions\/287"}],"wp:attachment":[{"href":"http:\/\/www.mrmarkyoung.com\/oracle\/wp-json\/wp\/v2\/media?parent=285"}],"wp:term":[{"taxonomy":"category","embeddable":true,"href":"http:\/\/www.mrmarkyoung.com\/oracle\/wp-json\/wp\/v2\/categories?post=285"},{"taxonomy":"post_tag","embeddable":true,"href":"http:\/\/www.mrmarkyoung.com\/oracle\/wp-json\/wp\/v2\/tags?post=285"}],"curies":[{"name":"wp","href":"https:\/\/api.w.org\/{rel}","templated":true}]}}