{"id":1205,"date":"2020-10-18T09:06:03","date_gmt":"2020-10-18T12:06:03","guid":{"rendered":"http:\/\/www.soudba.com.br\/?p=1205"},"modified":"2020-10-18T09:06:03","modified_gmt":"2020-10-18T12:06:03","slug":"how-to-solve-ora-38788-more-standby-database-recovery-is-needed","status":"publish","type":"post","link":"https:\/\/www.soudba.com.br\/?p=1205","title":{"rendered":"How to solve &#8211; ORA-38788: More standby database recovery is needed"},"content":{"rendered":"<h1>When doing a duplicate of database, restore, or simply convert to snapshot &#8211; we can get the error ORA-38788. See below:<\/h1>\n<p>SQL&gt; ALTER DATABASE FLASHBACK ON;<br \/>\nALTER DATABASE FLASHBACK ON<br \/>\n*<br \/>\nERROR at line 1:<br \/>\nORA-38706: Cannot turn on FLASHBACK DATABASE logging.<br \/>\nORA-38788: More standby database recovery is needed<\/p>\n<p>SQL&gt; ALTER DATABASE CONVERT TO SNAPSHOT STANDBY;<br \/>\nALTER DATABASE CONVERT TO SNAPSHOT STANDBY<br \/>\n*<br \/>\nERROR at line 1:<br \/>\nORA-38784: Cannot create restore point &#8216;SNAPSHOT_STANDBY_REQUIRED_10\/17\/2020 10:21:50&#8217;.<br \/>\n<strong>ORA-38788:<\/strong> More standby database recovery is needed<\/p>\n<h1>############################<br \/>\nSolution:<br \/>\n############################<\/h1>\n<h2>If I recovered using rman -&gt; recover database &#8211; will not stop until the last archivelog.<br \/>\nI tried to recover until sequence but the problem was the same. Requesting more recover.<br \/>\nThis approach can be tried &#8211; but, if you start to recover database you will use the option REAL APPLY.<br \/>\nPlease don&#8217;t use this approach if you are not totally fine with the terms used here.<br \/>\nReal apply is an option &#8211; and is very expensive. To use open database read only and start recover of archivelogs.<br \/>\nOnly opening database for read only without recover process active, is fine.<\/h2>\n<p>Check I am stopping the recovery processes first:<\/p>\n<p>SQL&gt; ALTER DATABASE RECOVER MANAGED STANDBY DATABASE CANCEL;<br \/>\nDatabase altered.<\/p>\n<p>My first shot: Tried to put flashback on: Not working.<\/p>\n<p>SQL&gt; ALTER DATABASE CONVERT TO SNAPSHOT STANDBY<br \/>\n*<br \/>\nERROR at line 1:<br \/>\nORA-38784: Cannot create restore point &#8216;SNAPSHOT_STANDBY_REQUIRED_10\/17\/2020 10:30:04&#8217;.<br \/>\nORA-38788: More standby database recovery is needed<\/p>\n<h1>My solution: starting to open read only, database will apply all necessary logs and will open database read only.<br \/>\nThis means, will not apply all archivelogs present in recovery area, will apply only necessary to the recover database.<\/h1>\n<p>SQL&gt; alter database open read only;<\/p>\n<p>##################################################<br \/>\nAlert log file:<br \/>\n##################################################<br \/>\nalter database open read only<br \/>\n2020-10-17T10:30:56.729708-03:00<br \/>\nPing without log force is disabled:<br \/>\ninstance mounted in exclusive mode.<br \/>\nSignalling error 1152 for datafile 1!<br \/>\n2020-10-17T10:30:56.804252-03:00<br \/>\nBeginning Standby Crash Recovery.<br \/>\nStarted logmerger process<br \/>\n2020-10-17T10:30:57.262836-03:00<br \/>\nManaged Standby Recovery starting Real Time Apply<br \/>\n2020-10-17T10:31:00.947756-03:00<br \/>\nParallel Media Recovery started with 8 slaves<br \/>\n2020-10-17T10:31:02.173885-03:00<br \/>\nMedia Recovery Log +RECOC2\/CDBX\/ARCHIVELOG\/2020_10_17\/thread_1_seq_60765.508.1054028951<br \/>\n2020-10-17T10:31:02.355754-03:00<br \/>\nMedia Recovery Log +RECOC2\/CDBX\/ARCHIVELOG\/2020_10_17\/thread_2_seq_57944.399.1054029017<br \/>\n2020-10-17T10:32:04.559638-03:00<\/p>\n<p><strong>And more archivelogs .. will stop when oracle database stay consistent.<\/strong><\/p>\n<p>Media Recovery Log +RECOC2\/CDBX\/ARCHIVELOG\/2020_10_17\/thread_2_seq_57979.366.1054029013<br \/>\n2020-10-17T10:44:11.183620-03:00<br \/>\nIncomplete Recovery applied until change 89911707313 time 10\/16\/2020 09:08:00<br \/>\n2020-10-17T10:44:12.665363-03:00<br \/>\nCompleted Standby Crash Recovery.<br \/>\n2020-10-17T10:44:14.195065-03:00<br \/>\nEndian type of dictionary set to little<br \/>\n2020-10-17T10:44:21.001041-03:00<br \/>\nUndo initialization finished serial:0 start:2974475204 end:2974475204 diff:0 ms (0.0 seconds)<br \/>\nDictionary check beginning<br \/>\n2020-10-17T10:44:23.588573-03:00<\/p>\n<h1>##################################################<br \/>\nDatabase was open<br \/>\n##################################################<\/h1>\n<p>Pluggable database XXXXX opened read only<br \/>\n2020-10-17T10:47:26.812990-03:00<br \/>\nCompleted: ALTER PLUGGABLE DATABASE ALL OPEN<br \/>\nCompleted: alter database open read only<\/p>\n<p>DB_UNIQUE_NAME DATABASE_ROLE OPEN_MODE VERSION COMPATIBLE STATUS<br \/>\n&#8212;&#8212;&#8212;&#8212;&#8212;- &#8212;&#8212;&#8212;&#8212;&#8212;- &#8212;&#8212;&#8212;&#8212;&#8212;&#8212;&#8211; &#8212;&#8212;&#8212;- &#8212;&#8212;&#8212;- &#8212;&#8212;&#8211;<br \/>\nCDBX PHYSICAL STANDBY READ ONLY 12.2.0.1.0 12.2.0.0.0 OPEN<\/p>\n<p>HOST_NAME INSTANCE_NAME STATUS Startup time LOGINS CONNECTED<br \/>\n&#8212;&#8212;&#8212;&#8212;&#8212;&#8212;&#8212;&#8212;&#8212;&#8212;&#8212;- &#8212;&#8212;&#8212;&#8212;&#8211; &#8212;&#8212;&#8211; &#8212;&#8212;&#8212;&#8212;&#8212;&#8212;&#8212;&#8212;&#8212;&#8212;&#8212;&#8212;&#8212;&#8212;&#8212;&#8212;&#8212;&#8212;&#8212;&#8212;&#8212;&#8212;&#8212;&#8212;&#8212; &#8212;&#8212;&#8211; &#8212;&#8212;&#8212;&#8212;<br \/>\nexacc CDBX OPEN 17-OCT-2020 08:03 ALLOWED CURRENT<br \/>\noraclecloudatcustomer.com<\/p>\n<p>##################################################<br \/>\n<strong>Some errors can be found in alert log and need be checked.<\/strong><br \/>\n##################################################<\/p>\n<p>cannot identify\/lock data file 1100 &#8211; see DBWR trace file<br \/>\nORA-01110: data file 1100: &#8216;+DATAC2&#8217;<br \/>\n2020-10-17T10:45:59.653763-03:00<br \/>\nFile 1100 not verified due to error ORA-01157<br \/>\n2020-10-17T10:45:59.743584-03:00<br \/>\nXXXXXPDB(67):Pluggable Database XXXXXPDB Dictionary check complete<br \/>\n2020-10-17T10:45:59.859089-03:00<br \/>\nErrors in file \/u02\/app\/oracle\/diag\/rdbms\/CDBX\/CDBX\/trace\/CDBX_dbw0_246152.trc:<br \/>\nORA-01186: file 1062 failed<\/p>\n<p>File 1094 not verified due to error ORA-01157<br \/>\n2020-10-17T10:46:17.516127-03:00<br \/>\nJ5CEN1RMP(55):Re-creating tempfile +DATAC2 as +DATAC2\/CDBX\/999B4F7580E46340E053023013ACC277\/TEMPFILE\/rm_tmp.1263.1054032377<\/p>\n<p>\/u02\/app\/oracle\/diag\/rdbms\/CDBX\/CDBX\/trace\/CDBX_dbw0_246152.trc<\/p>\n<p>&nbsp;<\/p>\n","protected":false},"excerpt":{"rendered":"<p>When doing a duplicate of database, restore, or simply convert to snapshot &#8211; we can get the error ORA-38788. See below: SQL&gt; ALTER DATABASE FLASHBACK ON; ALTER DATABASE FLASHBACK ON * ERROR at line 1: ORA-38706: Cannot turn on FLASHBACK &hellip; <a href=\"https:\/\/www.soudba.com.br\/?p=1205\">Continue lendo <span class=\"meta-nav\">&rarr;<\/span><\/a><\/p>\n","protected":false},"author":1,"featured_media":0,"comment_status":"open","ping_status":"open","sticky":false,"template":"","format":"standard","meta":{"footnotes":""},"categories":[64,282],"tags":[360,366,389,390,391,392,395],"class_list":["post-1205","post","type-post","status-publish","format-standard","hentry","category-dataguard","category-snapshot-standby","tag-convert-database-snapshot","tag-duplicate-fail-with-ora-38788","tag-ora-38784","tag-ora-38788","tag-ora-38788-more-standby-database-recovery-is-needed","tag-oracle-duplicate-failure","tag-recover-database"],"_links":{"self":[{"href":"https:\/\/www.soudba.com.br\/index.php?rest_route=\/wp\/v2\/posts\/1205","targetHints":{"allow":["GET"]}}],"collection":[{"href":"https:\/\/www.soudba.com.br\/index.php?rest_route=\/wp\/v2\/posts"}],"about":[{"href":"https:\/\/www.soudba.com.br\/index.php?rest_route=\/wp\/v2\/types\/post"}],"author":[{"embeddable":true,"href":"https:\/\/www.soudba.com.br\/index.php?rest_route=\/wp\/v2\/users\/1"}],"replies":[{"embeddable":true,"href":"https:\/\/www.soudba.com.br\/index.php?rest_route=%2Fwp%2Fv2%2Fcomments&post=1205"}],"version-history":[{"count":0,"href":"https:\/\/www.soudba.com.br\/index.php?rest_route=\/wp\/v2\/posts\/1205\/revisions"}],"wp:attachment":[{"href":"https:\/\/www.soudba.com.br\/index.php?rest_route=%2Fwp%2Fv2%2Fmedia&parent=1205"}],"wp:term":[{"taxonomy":"category","embeddable":true,"href":"https:\/\/www.soudba.com.br\/index.php?rest_route=%2Fwp%2Fv2%2Fcategories&post=1205"},{"taxonomy":"post_tag","embeddable":true,"href":"https:\/\/www.soudba.com.br\/index.php?rest_route=%2Fwp%2Fv2%2Ftags&post=1205"}],"curies":[{"name":"wp","href":"https:\/\/api.w.org\/{rel}","templated":true}]}}