{"id":503,"date":"2019-07-02T20:02:14","date_gmt":"2019-07-02T23:02:14","guid":{"rendered":"http:\/\/www.fernandosimon.com\/blog\/?p=503"},"modified":"2020-07-19T19:18:52","modified_gmt":"2020-07-19T22:18:52","slug":"rman-allocate-channel-cdb-and-close-bug","status":"publish","type":"post","link":"https:\/\/www.fernandosimon.com\/blog\/rman-allocate-channel-cdb-and-close-bug\/","title":{"rendered":"RMAN, Allocate channel, CDB, and CLOSE: bug"},"content":{"rendered":"<p style=\"text-align: justify;\">Allocate channel for RMAN is used in various scenarios, most of the time is useful when you use tape as device type or you need to use some kind of format. The way to do the allocation not changed since a long time ago, but when you run the database in container mode you can hit a bug that turns your channel unusable. I will show you the bug and how to avoid it with a simple trick.<\/p>\n<p style=\"text-align: justify;\">This bug hit every version since 12 and I discovered it last year when testing some scenarios, but I was able to test and post just recently. It just occurs for CDB databases and exists just one one-off solution published for 12.2. But there is one workaround more useful and works for every version.<\/p>\n<p style=\"text-align: justify;\">The most interesting part is that everything that we made until now when allocate channel will not work. You can search in all doc available for allocate channel since 9i until 19c the first thing that you made after open the run{} is allocate channel. This is the default and recommended in the docs: for <a href=\"https:\/\/docs.oracle.com\/en\/database\/oracle\/oracle-database\/19\/rcmrf\/ALLOCATE-CHANNEL.html#GUID-9320BFF7-0728-4B3D-85B9-2184557ECDCE\" target=\"_blank\" rel=\"noopener noreferrer\">19c<\/a>, <a href=\"https:\/\/docs.oracle.com\/en\/database\/oracle\/oracle-database\/18\/rcmrf\/ALLOCATE-CHANNEL.html#GUID-9320BFF7-0728-4B3D-85B9-2184557ECDCE\" target=\"_blank\" rel=\"noopener noreferrer\">18c<\/a>, and <a href=\"https:\/\/docs.oracle.com\/cd\/A97630_01\/server.920\/a96566\/rcmconc1.htm\" target=\"_blank\" rel=\"noopener noreferrer\">9i.<\/a><a href=\"http:\/\/www.fernandosimon.com\/blog\/wp-content\/uploads\/2019\/07\/bradv030.gif\"><img loading=\"lazy\" decoding=\"async\" class=\"aligncenter size-full wp-image-505\" src=\"http:\/\/www.fernandosimon.com\/blog\/wp-content\/uploads\/2019\/07\/bradv030.gif\" alt=\"\" width=\"496\" height=\"259\"><\/a><\/p>\n<p style=\"text-align: justify;\"><!--more More...--><\/p>\n<p style=\"text-align: justify;\">My environment for this post is 18c database (last update from April 2019) with just one PDB:<\/p>\n<pre class=\"EnlighterJSRAW\" data-enlighter-language=\"no-highlight\">[oracle@orcloel7 ~]$ sqlplus \/ as sysdba\r\n\r\nSQL*Plus: Release 18.0.0.0.0 - Production on Sun Jun 30 23:24:23 2019\r\nVersion 18.6.0.0.0\r\n\r\nCopyright (c) 1982, 2018, Oracle.  All rights reserved.\r\n\r\n\r\nConnected to:\r\nOracle Database 18c Enterprise Edition Release 18.0.0.0.0 - Production\r\nVersion 18.6.0.0.0\r\n\r\nSQL&gt; show pdbs\r\n\r\n    CON_ID CON_NAME                       OPEN MODE  RESTRICTED\r\n---------- ------------------------------ ---------- ----------\r\n         2 PDB$SEED                       READ ONLY  NO\r\n         3 ORCL18P                        READ WRITE NO\r\nSQL&gt; exit\r\nDisconnected from Oracle Database 18c Enterprise Edition Release 18.0.0.0.0 - Production\r\nVersion 18.6.0.0.0\r\n[oracle@orcloel7 ~]$<\/pre>\n<p style=\"text-align: justify;\">And for rman I show the schema and the backup for one datafile (#12) just to have smaller output.<\/p>\n<pre class=\"EnlighterJSRAW\" data-enlighter-language=\"no-highlight\">RMAN&gt; report schema;\r\n\r\nReport of database schema for database with db_unique_name ORCL18C\r\n\r\nList of Permanent Datafiles\r\n===========================\r\nFile Size(MB) Tablespace           RB segs Datafile Name\r\n---- -------- -------------------- ------- ------------------------\r\n1    870      SYSTEM               YES     \/u01\/app\/oracle\/oradata\/ORCL18C\/system01.dbf\r\n3    490      SYSAUX               NO      \/u01\/app\/oracle\/oradata\/ORCL18C\/sysaux01.dbf\r\n4    330      UNDOTBS1             YES     \/u01\/app\/oracle\/oradata\/ORCL18C\/undotbs01.dbf\r\n5    290      PDB$SEED:SYSTEM      NO      \/u01\/app\/oracle\/oradata\/ORCL18C\/pdbseed\/system01.dbf\r\n6    340      PDB$SEED:SYSAUX      NO      \/u01\/app\/oracle\/oradata\/ORCL18C\/pdbseed\/sysaux01.dbf\r\n7    5        USERS                NO      \/u01\/app\/oracle\/oradata\/ORCL18C\/users01.dbf\r\n8    100      PDB$SEED:UNDOTBS1    NO      \/u01\/app\/oracle\/oradata\/ORCL18C\/pdbseed\/undotbs01.dbf\r\n9    300      ORCL18P:SYSTEM       YES     \/u01\/app\/oracle\/oradata\/ORCL18C\/ORCL18P\/system01.dbf\r\n10   360      ORCL18P:SYSAUX       NO      \/u01\/app\/oracle\/oradata\/ORCL18C\/ORCL18P\/sysaux01.dbf\r\n11   100      ORCL18P:UNDOTBS1     YES     \/u01\/app\/oracle\/oradata\/ORCL18C\/ORCL18P\/undotbs01.dbf\r\n12   5        ORCL18P:USERS        NO      \/u01\/app\/oracle\/oradata\/ORCL18C\/ORCL18P\/users01.dbf\r\n\r\nList of Temporary Files\r\n=======================\r\nFile Size(MB) Tablespace           Maxsize(MB) Tempfile Name\r\n---- -------- -------------------- ----------- --------------------\r\n1    37       TEMP                 32767       \/u01\/app\/oracle\/oradata\/ORCL18C\/temp01.dbf\r\n2    62       PDB$SEED:TEMP        32767       \/u01\/app\/oracle\/oradata\/ORCL18C\/pdbseed\/temp012019-05-25_23-51-33-086-PM.dbf\r\n3    62       ORCL18P:TEMP         32767       \/u01\/app\/oracle\/oradata\/ORCL18C\/ORCL18P\/temp01.dbf\r\n\r\nRMAN&gt; list backup of datafile 12 completed after \"sysdate - 60\/1440\";\r\n\r\nstarting full resync of recovery catalog\r\nfull resync complete\r\n\r\nList of Backup Sets\r\n===================\r\n\r\n\r\nBS Key  Type LV Size       Device Type Elapsed Time Completion Time\r\n------- ---- -- ---------- ----------- ------------ ----------------\r\n4610    Incr 1  40.00K     SBT_TAPE    00:00:02     02-07-2019_00-03\r\n        BP Key: 4611   Status: AVAILABLE  Compressed: YES  Tag: TAG20190701T235918\r\n        Handle: VB$_4142545763_4609I   Media:\r\n  List of Datafiles in backup set 4610\r\n  File LV Type Ckp SCN    Ckp Time         Abs Fuz SCN Sparse Name\r\n  ---- -- ---- ---------- ---------------- ----------- ------ ----\r\n  12   1  Incr 1714757    02-07-2019_00-03              NO    \/u01\/app\/oracle\/oradata\/ORCL18C\/ORCL18P\/users01.dbf\r\n\r\nBS Key  Type LV Size       Device Type Elapsed Time Completion Time\r\n------- ---- -- ---------- ----------- ------------ ----------------\r\n4614    Incr 0  36.50K     SBT_TAPE    00:00:02     02-07-2019_00-03\r\n        BP Key: 4615   Status: AVAILABLE  Compressed: YES  Tag: TAG20190701T235918\r\n        Handle: VB$_4142545763_4609_12   Media:\r\n  List of Datafiles in backup set 4614\r\n  File LV Type Ckp SCN    Ckp Time         Abs Fuz SCN Sparse Name\r\n  ---- -- ---- ---------- ---------------- ----------- ------ ----\r\n  12   0  Incr 1714757    02-07-2019_00-03              NO    \/u01\/app\/oracle\/oradata\/ORCL18C\/ORCL18P\/users01.dbf\r\n\r\nRMAN&gt;<\/pre>\n<p style=\"text-align: justify;\">But look the example below where I try to restore the datafile (maybe because was corrupted \u2013 whatever the reason):<\/p>\n<pre class=\"EnlighterJSRAW\" data-enlighter-language=\"no-highlight\">RMAN&gt; run{\r\n2&gt; ALLOCATE CHANNEL CH1 DEVICE TYPE 'SBT_TAPE' FORMAT '%d_%U' PARMS  \"SBT_LIBRARY=\/u01\/app\/oracle\/product\/18.6.0.0\/dbhome_1\/lib\/libra.so, ENV=(RA_WALLET='location=file:\/u01\/app\/oracle\/product\/18.6.0.0\/dbhome_1\/dbs\/ra_zdlra credential_alias=zdlra-scan:1521\/zdlra:orcl')\";\r\nALTER PLUGGABLE DATABASE ORCL18P CLOSE IMMEDIATE INSTANCES=ALL;\r\nRESTORE DATAFILE 12;\r\nRECOVER DATAFILE 12;\r\n}3&gt; 4&gt; 5&gt; 6&gt;\r\n\r\nallocated channel: CH1\r\nchannel CH1: SID=72 device type=SBT_TAPE\r\nchannel CH1: RA Library (ZDLRA) SID=8CA6E4CA5A751068E053010310AC0A07\r\n\r\nStatement processed\r\nstarting full resync of recovery catalog\r\nfull resync complete\r\n\r\nStarting restore at 02-07-2019_00-18\r\nallocated channel: ORA_DISK_1\r\nchannel ORA_DISK_1: SID=72 device type=DISK\r\n\r\nRMAN-00571: ===========================================================\r\nRMAN-00569: =============== ERROR MESSAGE STACK FOLLOWS ===============\r\nRMAN-00571: ===========================================================\r\nRMAN-03002: failure of restore command at 07\/02\/2019 00:18:08\r\nRMAN-06026: some targets not found - aborting restore\r\nRMAN-06100: no channel to restore a backup or copy of datafile 12\r\n\r\nRMAN&gt;<\/pre>\n<p>And now this:<\/p>\n<pre class=\"EnlighterJSRAW\" data-enlighter-language=\"no-highlight\">RMAN&gt; run{\r\nALTER PLUGGABLE DATABASE ORCL18P CLOSE IMMEDIATE INSTANCES=ALL;\r\nALLOCATE CHANNEL CH1 DEVICE TYPE 'SBT_TAPE' FORMAT '%d_%U' PARMS  \"SBT_LIBRARY=\/u01\/app\/oracle\/product\/18.6.0.0\/dbhome_1\/lib\/libra.so, ENV=(RA_WALLET='location=file:\/u01\/app\/oracle\/product\/18.6.0.0\/dbhome_1\/dbs\/ra_zdlra credential_alias=zdlra-scan:1521\/zdlra:orcl')\";\r\nRESTORE DATAFILE 12;\r\nRECOVER DATAFILE 12;\r\n} 2&gt; 3&gt; 4&gt; 5&gt; 6&gt;\r\n\r\nStatement processed\r\nstarting full resync of recovery catalog\r\nfull resync complete\r\n\r\nallocated channel: CH1\r\nchannel CH1: SID=63 device type=SBT_TAPE\r\nchannel CH1: RA Library (ZDLRA) SID=8CA703A063E7127DE053010310ACC85B\r\n\r\nStarting restore at 02-07-2019_00-18\r\n\r\nchannel CH1: starting datafile backup set restore\r\nchannel CH1: specifying datafile(s) to restore from backup set\r\nchannel CH1: restoring datafile 00012 to \/u01\/app\/oracle\/oradata\/ORCL18C\/ORCL18P\/users01.dbf\r\nchannel CH1: reading from backup piece VB$_4142545763_4609_12\r\nchannel CH1: piece handle=VB$_4142545763_4609_12 tag=TAG20190701T235918\r\nchannel CH1: restored backup piece 1\r\nchannel CH1: restore complete, elapsed time: 00:00:25\r\nFinished restore at 02-07-2019_00-19\r\n\r\nStarting recover at 02-07-2019_00-19\r\n\r\nstarting media recovery\r\nmedia recovery complete, elapsed time: 00:00:01\r\n\r\nFinished recover at 02-07-2019_00-19\r\nstarting full resync of recovery catalog\r\nfull resync complete\r\nreleased channel: CH1\r\n\r\nRMAN&gt; ALTER PLUGGABLE DATABASE ORCL18P OPEN INSTANCES=ALL;\r\n\r\nStatement processed\r\nstarting full resync of recovery catalog\r\nfull resync complete\r\n\r\nRMAN&gt;<\/pre>\n<p style=\"text-align: justify;\">Saw the bug? YES, the bug occurs when you allocate the channel and after execute a close command. When you do the \u201cclose\u201d, rman internally cleans everything related for the session (including allocated channels) and you can hit the \u201c<em>RMAN-06100: no channel to restore a backup<\/em>\u201d or others similar errors like <em>RMAN-06012: channel: CH1 not allocated<\/em>.<\/p>\n<p style=\"text-align: justify;\">The bug is <a href=\"https:\/\/support.oracle.com\/epmos\/faces\/DocContentDisplay?id=28076886.8\" target=\"_blank\" rel=\"noopener noreferrer\"><em>Bug 28076886 &#8211; RMAN: RMAN-06012: &#8220;channel: %s not allocated&#8221; after ALTER PLUGGABLE DATABASE CLOSE command (Doc ID 28076886.8)<\/em><\/a>.<\/p>\n<p style=\"text-align: justify;\">The error occurs even for disk channels too (look full example):<\/p>\n<pre class=\"EnlighterJSRAW\" data-enlighter-language=\"no-highlight\">RMAN&gt; RUN {\r\nALLOCATE CHANNEL CH1 DEVICE TYPE DISK;\r\nALTER PLUGGABLE DATABASE ORCL18P CLOSE;\r\nRECOVER DATABASE PREVIEW;\r\nRELEASE CHANNEL CH1;\r\n}2&gt; 3&gt; 4&gt; 5&gt; 6&gt;\r\n\r\nallocated channel: CH1\r\nchannel CH1: SID=110 device type=DISK\r\n\r\nStatement processed\r\nstarting full resync of recovery catalog\r\nfull resync complete\r\n\r\nStarting recover at 01-07-2019_00-34\r\nallocated channel: ORA_DISK_1\r\nchannel ORA_DISK_1: SID=110 device type=DISK\r\nusing channel ORA_DISK_1\r\n\r\nno channel to restore a backup or copy of archived log for thread 1 with sequence 5 and starting SCN of 1552035\r\nno channel to restore a backup or copy of archived log for thread 1 with sequence 6 and starting SCN of 1608615\r\nno channel to restore a backup or copy of archived log for thread 1 with sequence 7 and starting SCN of 1669357\r\nno channel to restore a backup or copy of archived log for thread 1 with sequence 8 and starting SCN of 1681533\r\nno channel to restore a backup or copy of archived log for thread 1 with sequence 9 and starting SCN of 1681555\r\nno channel to restore a backup or copy of archived log for thread 1 with sequence 10 and starting SCN of 1682610\r\nList of Archived Log Copies for database with db_unique_name ORCL18C\r\n=====================================================================\r\n\r\nKey     Thrd Seq     S Low Time\r\n------- ---- ------- - ----------------\r\n3516    1    11      A 26-05-2019_19-13\r\n        Name: \/u01\/app\/oracle\/oradata\/ORCL18C\/archivelog\/2019_06_30\/o1_mf_1_11_gklbz4oh_.arc\r\n\r\nrecovery will be done up to SCN 1603932\r\nMedia recovery start SCN is 1603932\r\nRecovery must be done beyond SCN 1692620 to clear datafile fuzziness\r\nFinished recover at 01-07-2019_00-35\r\n\r\nRMAN-00571: ===========================================================\r\nRMAN-00569: =============== ERROR MESSAGE STACK FOLLOWS ===============\r\nRMAN-00571: ===========================================================\r\nRMAN-03002: failure of release command at 07\/01\/2019 00:35:01\r\nRMAN-06012: channel: CH1 not allocated\r\n\r\nRMAN&gt; RUN {\r\nALTER PLUGGABLE DATABASE ORCL18P CLOSE;\r\nALLOCATE CHANNEL CH1 DEVICE TYPE DISK;\r\nRECOVER DATABASE PREVIEW;\r\nRELEASE CHANNEL CH1;\r\n}2&gt; 3&gt; 4&gt; 5&gt; 6&gt;\r\n\r\nStatement processed\r\nstarting full resync of recovery catalog\r\nfull resync complete\r\n\r\nallocated channel: CH1\r\nchannel CH1: SID=110 device type=DISK\r\n\r\nStarting recover at 01-07-2019_00-35\r\n\r\nno channel to restore a backup or copy of archived log for thread 1 with sequence 5 and starting SCN of 1552035\r\nno channel to restore a backup or copy of archived log for thread 1 with sequence 6 and starting SCN of 1608615\r\nno channel to restore a backup or copy of archived log for thread 1 with sequence 7 and starting SCN of 1669357\r\nno channel to restore a backup or copy of archived log for thread 1 with sequence 8 and starting SCN of 1681533\r\nno channel to restore a backup or copy of archived log for thread 1 with sequence 9 and starting SCN of 1681555\r\nno channel to restore a backup or copy of archived log for thread 1 with sequence 10 and starting SCN of 1682610\r\nList of Archived Log Copies for database with db_unique_name ORCL18C\r\n=====================================================================\r\n\r\nKey     Thrd Seq     S Low Time\r\n------- ---- ------- - ----------------\r\n3516    1    11      A 26-05-2019_19-13\r\n        Name: \/u01\/app\/oracle\/oradata\/ORCL18C\/archivelog\/2019_06_30\/o1_mf_1_11_gklbz4oh_.arc\r\n\r\nrecovery will be done up to SCN 1603932\r\nMedia recovery start SCN is 1603932\r\nRecovery must be done beyond SCN 1693086 to clear datafile fuzziness\r\nFinished recover at 01-07-2019_00-36\r\n\r\nreleased channel: CH1\r\n\r\nRMAN&gt;<\/pre>\n<p>But can be trickier to discover the failure. Look the example below that I try to backup datafile #12:<\/p>\n<pre class=\"EnlighterJSRAW \" data-enlighter-language=\"no-highlight\">RMAN&gt; run{\r\nALLOCATE CHANNEL CH1 DEVICE TYPE 'SBT_TAPE' FORMAT '%d_%U' PARMS  \"SBT_LIBRARY=\/u01\/app\/oracle\/product\/18.6.0.0\/dbhome_1\/lib\/libra.so, ENV=(RA_WALLET='location=file:\/u01\/app\/oracle\/product\/18.6.0.0\/dbhome_1\/dbs\/ra_zdlra credential_alias=zdlra-scan:1521\/zdlra:orcl')\";\r\nALTER PLUGGABLE DATABASE ORCL18P CLOSE IMMEDIATE INSTANCES=ALL;\r\nBACKUP INCREMENTAL LEVEL 1 DATAFILE 12;\r\n}2&gt; 3&gt; 4&gt; 5&gt;\r\n\r\nallocated channel: CH1\r\nchannel CH1: SID=156 device type=SBT_TAPE\r\nchannel CH1: RA Library (ZDLRA) SID=8CBA2C4600D309E8E053010310AC3E17\r\n\r\nStatement processed\r\nstarting full resync of recovery catalog\r\nfull resync complete\r\n\r\nStarting backup at 02-07-2019_23-25\r\nallocated channel: ORA_DISK_1\r\nchannel ORA_DISK_1: SID=106 device type=DISK\r\nchannel ORA_DISK_1: starting incremental level 1 datafile backup set\r\nchannel ORA_DISK_1: specifying datafile(s) in backup set\r\ninput datafile file number=00012 name=\/u01\/app\/oracle\/oradata\/ORCL18C\/ORCL18P\/users01.dbf\r\nchannel ORA_DISK_1: starting piece 1 at 02-07-2019_23-25\r\nchannel ORA_DISK_1: finished piece 1 at 02-07-2019_23-25\r\npiece handle=\/u01\/app\/oracle\/oradata\/ORCL18C\/89BE7E168E3D28BDE053010310AC2497\/backupset\/2019_07_02\/o1_mf_nnnd1_TAG20190702T232547_gkqlyx8j_.bkp tag=TAG20190702T232547 comment=NONE\r\nchannel ORA_DISK_1: backup set complete, elapsed time: 00:00:01\r\nFinished backup at 02-07-2019_23-25\r\n\r\nStarting Control File and SPFILE Autobackup at 02-07-2019_23-25\r\npiece handle=\/u01\/app\/oracle\/oradata\/ORCL18C\/autobackup\/2019_07_02\/o1_mf_s_1012605951_gkqlz1vm_.bkp comment=NONE\r\nFinished Control File and SPFILE Autobackup at 02-07-2019_23-25\r\n\r\nRMAN&gt; list backup of datafile 12 summary;\r\n\r\n\r\nList of Backups\r\n===============\r\nKey     TY LV S Device Type Completion Time  #Pieces #Copies Compressed Tag\r\n------- -- -- - ----------- ---------------- ------- ------- ---------- ---\r\n4270    B  0  A SBT_TAPE    01-07-2019_00-42 1       1       YES        TAG20190701T003820\r\n4610    B  1  A SBT_TAPE    02-07-2019_00-03 1       1       YES        TAG20190701T235918\r\n4614    B  0  A SBT_TAPE    02-07-2019_00-03 1       1       YES        TAG20190701T235918\r\n5197    B  1  A DISK        02-07-2019_23-25 1       1       NO         TAG20190702T232547\r\n\r\nRMAN&gt;\r\n\r\n\r\nAnd now:\r\n\r\n\r\nRMAN&gt; run{\r\nALTER PLUGGABLE DATABASE ORCL18P CLOSE IMMEDIATE INSTANCES=ALL;\r\nALLOCATE CHANNEL CH1 DEVICE TYPE 'SBT_TAPE' FORMAT '%d_%U' PARMS  \"SBT_LIBRARY=\/u01\/app\/oracle\/product\/18.6.0.0\/dbhome_1\/lib\/libra.so, ENV=(RA_WALLET='location=file:\/u01\/app\/oracle\/product\/18.6.0.0\/dbhome_1\/dbs\/ra_zdlra credential_alias=zdlra-scan:1521\/zdlra:orcl')\";\r\nBACKUP INCREMENTAL LEVEL 1 DATAFILE 12;\r\n}2&gt; 3&gt; 4&gt; 5&gt;\r\n\r\nStatement processed\r\nstarting full resync of recovery catalog\r\nfull resync complete\r\n\r\nallocated channel: CH1\r\nchannel CH1: SID=105 device type=SBT_TAPE\r\nchannel CH1: RA Library (ZDLRA) SID=8CBAA68CCD751232E053010310AC374B\r\n\r\nStarting backup at 02-07-2019_23-44\r\nchannel CH1: starting incremental level 1 datafile backup set\r\nchannel CH1: specifying datafile(s) in backup set\r\ninput datafile file number=00012 name=\/u01\/app\/oracle\/oradata\/ORCL18C\/ORCL18P\/users01.dbf\r\nchannel CH1: starting piece 1 at 02-07-2019_23-44\r\nchannel CH1: finished piece 1 at 02-07-2019_23-44\r\npiece handle=ORCL18C_3pu5ma33_1_1 tag=TAG20190702T234435 comment=API Version 2.0,MMS Version 12.2.0.2\r\nchannel CH1: backup set complete, elapsed time: 00:00:03\r\nFinished backup at 02-07-2019_23-44\r\n\r\nStarting Control File and SPFILE Autobackup at 02-07-2019_23-44\r\npiece handle=c-551670416-20190702-02 comment=API Version 2.0,MMS Version 12.2.0.2\r\nFinished Control File and SPFILE Autobackup at 02-07-2019_23-44\r\nreleased channel: CH1\r\n\r\nRMAN&gt;<\/pre>\n<p>Look that because of the bug, in the first example, the backup was made to disk and not in the tape as requested. In the last, you can see that backup was made correctly in tape. But as you saw, no error was reported.<\/p>\n<h2>Conclusion<\/h2>\n<p>As you saw a tricky bug can change everything that we already know (and need to do) for a daily basis activity. One simple \u201cclose\u201d for a PDB can destroy your backup\/restore policy that you use from decades. Besides that even without \u201c<em>RMAN-06100: no channel to restore a backup<\/em>\u201d or other similar errors like <em>RMAN-06012: channel: CH1 not allocated<\/em> you can have problems.<\/p>\n<p>Luckily if you are running affected version (everything below 19.2) the workaround is very simple to deploy.<\/p>\n<p>&nbsp;<\/p>\n<p><em><strong>Disclaimer<\/strong><\/em><em>: &#8220;The postings on this site are my own and don&#8217;t necessarily represent my actual employer positions, strategies or opinions. The information here was edited to be useful for general purpose, specific data and identifications were removed to allow reach the generic audience and to be useful for the community. Post protected by copyright.\u201d<\/em><\/p>\n","protected":false},"excerpt":{"rendered":"<p>Allocate channel for RMAN is used in various scenarios, most of the time is useful when you use tape as device type or you need to use some kind of format. The way to do the allocation not changed since a long time ago, but when you run the database in container mode you can [&hellip;]<\/p>\n","protected":false},"author":2,"featured_media":0,"comment_status":"open","ping_status":"open","sticky":false,"template":"","format":"standard","meta":{"ngg_post_thumbnail":0,"jetpack_post_was_ever_published":false,"_jetpack_newsletter_access":"","_jetpack_dont_email_post_to_subs":false,"_jetpack_newsletter_tier_id":0,"_jetpack_memberships_contains_paywalled_content":false,"_jetpack_memberships_contains_paid_content":false,"footnotes":"","jetpack_publicize_message":"","jetpack_publicize_feature_enabled":true,"jetpack_social_post_already_shared":true,"jetpack_social_options":{"image_generator_settings":{"template":"highway","default_image_id":0,"font":"","enabled":false},"version":2}},"categories":[44,30,29,5,45,91],"tags":[93,97,96,66,65,95,94,92],"class_list":["post-503","post","type-post","status-publish","format-standard","hentry","category-backup","category-banco-de-dados","category-database","category-oracle","category-restore","category-rman","tag-backup","tag-bug","tag-cdb","tag-database","tag-oracle","tag-pdb","tag-restor","tag-rman"],"yoast_head":"<!-- This site is optimized with the Yoast SEO plugin v26.8 - https:\/\/yoast.com\/product\/yoast-seo-wordpress\/ -->\n<title>RMAN, Allocate channel, CDB, and CLOSE: bug - Fernando Simon<\/title>\n<meta name=\"description\" content=\"Check how CLOSE command for PDB\/CDB can make the &quot;allocate channel&quot; for RMAN unusable and hit RMAN-06012, RMAN-06100, or even no error report.\" \/>\n<meta name=\"robots\" content=\"index, follow, max-snippet:-1, max-image-preview:large, max-video-preview:-1\" \/>\n<link rel=\"canonical\" href=\"https:\/\/www.fernandosimon.com\/blog\/rman-allocate-channel-cdb-and-close-bug\/\" \/>\n<meta property=\"og:locale\" content=\"en_US\" \/>\n<meta property=\"og:type\" content=\"article\" \/>\n<meta property=\"og:title\" content=\"RMAN, Allocate channel, CDB, and CLOSE: bug - Fernando Simon\" \/>\n<meta property=\"og:description\" content=\"Check how CLOSE command for PDB\/CDB can make the &quot;allocate channel&quot; for RMAN unusable and hit RMAN-06012, RMAN-06100, or even no error report.\" \/>\n<meta property=\"og:url\" content=\"https:\/\/www.fernandosimon.com\/blog\/rman-allocate-channel-cdb-and-close-bug\/\" \/>\n<meta property=\"og:site_name\" content=\"Fernando Simon\" \/>\n<meta property=\"article:published_time\" content=\"2019-07-02T23:02:14+00:00\" \/>\n<meta property=\"article:modified_time\" content=\"2020-07-19T22:18:52+00:00\" \/>\n<meta property=\"og:image\" content=\"http:\/\/www.fernandosimon.com\/blog\/wp-content\/uploads\/2019\/07\/bradv030.gif\" \/>\n<meta name=\"author\" content=\"Simon\" \/>\n<meta name=\"twitter:card\" content=\"summary_large_image\" \/>\n<meta name=\"twitter:label1\" content=\"Written by\" \/>\n\t<meta name=\"twitter:data1\" content=\"Simon\" \/>\n\t<meta name=\"twitter:label2\" content=\"Est. reading time\" \/>\n\t<meta name=\"twitter:data2\" content=\"12 minutes\" \/>\n<script type=\"application\/ld+json\" class=\"yoast-schema-graph\">{\"@context\":\"https:\/\/schema.org\",\"@graph\":[{\"@type\":\"Article\",\"@id\":\"https:\/\/www.fernandosimon.com\/blog\/rman-allocate-channel-cdb-and-close-bug\/#article\",\"isPartOf\":{\"@id\":\"https:\/\/www.fernandosimon.com\/blog\/rman-allocate-channel-cdb-and-close-bug\/\"},\"author\":{\"name\":\"Simon\",\"@id\":\"https:\/\/www.fernandosimon.com\/blog\/#\/schema\/person\/386da956604bca0d5be5dd52210c1dd9\"},\"headline\":\"RMAN, Allocate channel, CDB, and CLOSE: bug\",\"datePublished\":\"2019-07-02T23:02:14+00:00\",\"dateModified\":\"2020-07-19T22:18:52+00:00\",\"mainEntityOfPage\":{\"@id\":\"https:\/\/www.fernandosimon.com\/blog\/rman-allocate-channel-cdb-and-close-bug\/\"},\"wordCount\":537,\"commentCount\":0,\"image\":{\"@id\":\"https:\/\/www.fernandosimon.com\/blog\/rman-allocate-channel-cdb-and-close-bug\/#primaryimage\"},\"thumbnailUrl\":\"http:\/\/www.fernandosimon.com\/blog\/wp-content\/uploads\/2019\/07\/bradv030.gif\",\"keywords\":[\"backup\",\"bug\",\"cdb\",\"Database\",\"Oracle\",\"pdb\",\"restor\",\"rman\"],\"articleSection\":[\"Backup\",\"Banco de Dados\",\"Database\",\"Oracle\",\"Restore\",\"RMAN\"],\"inLanguage\":\"en-US\",\"potentialAction\":[{\"@type\":\"CommentAction\",\"name\":\"Comment\",\"target\":[\"https:\/\/www.fernandosimon.com\/blog\/rman-allocate-channel-cdb-and-close-bug\/#respond\"]}]},{\"@type\":\"WebPage\",\"@id\":\"https:\/\/www.fernandosimon.com\/blog\/rman-allocate-channel-cdb-and-close-bug\/\",\"url\":\"https:\/\/www.fernandosimon.com\/blog\/rman-allocate-channel-cdb-and-close-bug\/\",\"name\":\"RMAN, Allocate channel, CDB, and CLOSE: bug - Fernando Simon\",\"isPartOf\":{\"@id\":\"https:\/\/www.fernandosimon.com\/blog\/#website\"},\"primaryImageOfPage\":{\"@id\":\"https:\/\/www.fernandosimon.com\/blog\/rman-allocate-channel-cdb-and-close-bug\/#primaryimage\"},\"image\":{\"@id\":\"https:\/\/www.fernandosimon.com\/blog\/rman-allocate-channel-cdb-and-close-bug\/#primaryimage\"},\"thumbnailUrl\":\"http:\/\/www.fernandosimon.com\/blog\/wp-content\/uploads\/2019\/07\/bradv030.gif\",\"datePublished\":\"2019-07-02T23:02:14+00:00\",\"dateModified\":\"2020-07-19T22:18:52+00:00\",\"author\":{\"@id\":\"https:\/\/www.fernandosimon.com\/blog\/#\/schema\/person\/386da956604bca0d5be5dd52210c1dd9\"},\"description\":\"Check how CLOSE command for PDB\/CDB can make the \\\"allocate channel\\\" for RMAN unusable and hit RMAN-06012, RMAN-06100, or even no error report.\",\"breadcrumb\":{\"@id\":\"https:\/\/www.fernandosimon.com\/blog\/rman-allocate-channel-cdb-and-close-bug\/#breadcrumb\"},\"inLanguage\":\"en-US\",\"potentialAction\":[{\"@type\":\"ReadAction\",\"target\":[\"https:\/\/www.fernandosimon.com\/blog\/rman-allocate-channel-cdb-and-close-bug\/\"]}]},{\"@type\":\"ImageObject\",\"inLanguage\":\"en-US\",\"@id\":\"https:\/\/www.fernandosimon.com\/blog\/rman-allocate-channel-cdb-and-close-bug\/#primaryimage\",\"url\":\"http:\/\/www.fernandosimon.com\/blog\/wp-content\/uploads\/2019\/07\/bradv030.gif\",\"contentUrl\":\"http:\/\/www.fernandosimon.com\/blog\/wp-content\/uploads\/2019\/07\/bradv030.gif\"},{\"@type\":\"BreadcrumbList\",\"@id\":\"https:\/\/www.fernandosimon.com\/blog\/rman-allocate-channel-cdb-and-close-bug\/#breadcrumb\",\"itemListElement\":[{\"@type\":\"ListItem\",\"position\":1,\"name\":\"Home\",\"item\":\"https:\/\/www.fernandosimon.com\/blog\/\"},{\"@type\":\"ListItem\",\"position\":2,\"name\":\"RMAN, Allocate channel, CDB, and CLOSE: bug\"}]},{\"@type\":\"WebSite\",\"@id\":\"https:\/\/www.fernandosimon.com\/blog\/#website\",\"url\":\"https:\/\/www.fernandosimon.com\/blog\/\",\"name\":\"Fernando Simon\",\"description\":\"Have you hugged your backup today?\",\"potentialAction\":[{\"@type\":\"SearchAction\",\"target\":{\"@type\":\"EntryPoint\",\"urlTemplate\":\"https:\/\/www.fernandosimon.com\/blog\/?s={search_term_string}\"},\"query-input\":{\"@type\":\"PropertyValueSpecification\",\"valueRequired\":true,\"valueName\":\"search_term_string\"}}],\"inLanguage\":\"en-US\"},{\"@type\":\"Person\",\"@id\":\"https:\/\/www.fernandosimon.com\/blog\/#\/schema\/person\/386da956604bca0d5be5dd52210c1dd9\",\"name\":\"Simon\",\"image\":{\"@type\":\"ImageObject\",\"inLanguage\":\"en-US\",\"@id\":\"https:\/\/www.fernandosimon.com\/blog\/#\/schema\/person\/image\/\",\"url\":\"https:\/\/secure.gravatar.com\/avatar\/a3dbc48de62fffb1829befb4a588d789ec6dc5e05977afabb3407a5f37a16482?s=96&d=mm&r=g\",\"contentUrl\":\"https:\/\/secure.gravatar.com\/avatar\/a3dbc48de62fffb1829befb4a588d789ec6dc5e05977afabb3407a5f37a16482?s=96&d=mm&r=g\",\"caption\":\"Simon\"},\"sameAs\":[\"http:\/\/www.fernandosimon.com\"],\"url\":\"https:\/\/www.fernandosimon.com\/blog\/author\/simon\/\"}]}<\/script>\n<!-- \/ Yoast SEO plugin. -->","yoast_head_json":{"title":"RMAN, Allocate channel, CDB, and CLOSE: bug - Fernando Simon","description":"Check how CLOSE command for PDB\/CDB can make the \"allocate channel\" for RMAN unusable and hit RMAN-06012, RMAN-06100, or even no error report.","robots":{"index":"index","follow":"follow","max-snippet":"max-snippet:-1","max-image-preview":"max-image-preview:large","max-video-preview":"max-video-preview:-1"},"canonical":"https:\/\/www.fernandosimon.com\/blog\/rman-allocate-channel-cdb-and-close-bug\/","og_locale":"en_US","og_type":"article","og_title":"RMAN, Allocate channel, CDB, and CLOSE: bug - Fernando Simon","og_description":"Check how CLOSE command for PDB\/CDB can make the \"allocate channel\" for RMAN unusable and hit RMAN-06012, RMAN-06100, or even no error report.","og_url":"https:\/\/www.fernandosimon.com\/blog\/rman-allocate-channel-cdb-and-close-bug\/","og_site_name":"Fernando Simon","article_published_time":"2019-07-02T23:02:14+00:00","article_modified_time":"2020-07-19T22:18:52+00:00","og_image":[{"url":"http:\/\/www.fernandosimon.com\/blog\/wp-content\/uploads\/2019\/07\/bradv030.gif","type":"","width":"","height":""}],"author":"Simon","twitter_card":"summary_large_image","twitter_misc":{"Written by":"Simon","Est. reading time":"12 minutes"},"schema":{"@context":"https:\/\/schema.org","@graph":[{"@type":"Article","@id":"https:\/\/www.fernandosimon.com\/blog\/rman-allocate-channel-cdb-and-close-bug\/#article","isPartOf":{"@id":"https:\/\/www.fernandosimon.com\/blog\/rman-allocate-channel-cdb-and-close-bug\/"},"author":{"name":"Simon","@id":"https:\/\/www.fernandosimon.com\/blog\/#\/schema\/person\/386da956604bca0d5be5dd52210c1dd9"},"headline":"RMAN, Allocate channel, CDB, and CLOSE: bug","datePublished":"2019-07-02T23:02:14+00:00","dateModified":"2020-07-19T22:18:52+00:00","mainEntityOfPage":{"@id":"https:\/\/www.fernandosimon.com\/blog\/rman-allocate-channel-cdb-and-close-bug\/"},"wordCount":537,"commentCount":0,"image":{"@id":"https:\/\/www.fernandosimon.com\/blog\/rman-allocate-channel-cdb-and-close-bug\/#primaryimage"},"thumbnailUrl":"http:\/\/www.fernandosimon.com\/blog\/wp-content\/uploads\/2019\/07\/bradv030.gif","keywords":["backup","bug","cdb","Database","Oracle","pdb","restor","rman"],"articleSection":["Backup","Banco de Dados","Database","Oracle","Restore","RMAN"],"inLanguage":"en-US","potentialAction":[{"@type":"CommentAction","name":"Comment","target":["https:\/\/www.fernandosimon.com\/blog\/rman-allocate-channel-cdb-and-close-bug\/#respond"]}]},{"@type":"WebPage","@id":"https:\/\/www.fernandosimon.com\/blog\/rman-allocate-channel-cdb-and-close-bug\/","url":"https:\/\/www.fernandosimon.com\/blog\/rman-allocate-channel-cdb-and-close-bug\/","name":"RMAN, Allocate channel, CDB, and CLOSE: bug - Fernando Simon","isPartOf":{"@id":"https:\/\/www.fernandosimon.com\/blog\/#website"},"primaryImageOfPage":{"@id":"https:\/\/www.fernandosimon.com\/blog\/rman-allocate-channel-cdb-and-close-bug\/#primaryimage"},"image":{"@id":"https:\/\/www.fernandosimon.com\/blog\/rman-allocate-channel-cdb-and-close-bug\/#primaryimage"},"thumbnailUrl":"http:\/\/www.fernandosimon.com\/blog\/wp-content\/uploads\/2019\/07\/bradv030.gif","datePublished":"2019-07-02T23:02:14+00:00","dateModified":"2020-07-19T22:18:52+00:00","author":{"@id":"https:\/\/www.fernandosimon.com\/blog\/#\/schema\/person\/386da956604bca0d5be5dd52210c1dd9"},"description":"Check how CLOSE command for PDB\/CDB can make the \"allocate channel\" for RMAN unusable and hit RMAN-06012, RMAN-06100, or even no error report.","breadcrumb":{"@id":"https:\/\/www.fernandosimon.com\/blog\/rman-allocate-channel-cdb-and-close-bug\/#breadcrumb"},"inLanguage":"en-US","potentialAction":[{"@type":"ReadAction","target":["https:\/\/www.fernandosimon.com\/blog\/rman-allocate-channel-cdb-and-close-bug\/"]}]},{"@type":"ImageObject","inLanguage":"en-US","@id":"https:\/\/www.fernandosimon.com\/blog\/rman-allocate-channel-cdb-and-close-bug\/#primaryimage","url":"http:\/\/www.fernandosimon.com\/blog\/wp-content\/uploads\/2019\/07\/bradv030.gif","contentUrl":"http:\/\/www.fernandosimon.com\/blog\/wp-content\/uploads\/2019\/07\/bradv030.gif"},{"@type":"BreadcrumbList","@id":"https:\/\/www.fernandosimon.com\/blog\/rman-allocate-channel-cdb-and-close-bug\/#breadcrumb","itemListElement":[{"@type":"ListItem","position":1,"name":"Home","item":"https:\/\/www.fernandosimon.com\/blog\/"},{"@type":"ListItem","position":2,"name":"RMAN, Allocate channel, CDB, and CLOSE: bug"}]},{"@type":"WebSite","@id":"https:\/\/www.fernandosimon.com\/blog\/#website","url":"https:\/\/www.fernandosimon.com\/blog\/","name":"Fernando Simon","description":"Have you hugged your backup today?","potentialAction":[{"@type":"SearchAction","target":{"@type":"EntryPoint","urlTemplate":"https:\/\/www.fernandosimon.com\/blog\/?s={search_term_string}"},"query-input":{"@type":"PropertyValueSpecification","valueRequired":true,"valueName":"search_term_string"}}],"inLanguage":"en-US"},{"@type":"Person","@id":"https:\/\/www.fernandosimon.com\/blog\/#\/schema\/person\/386da956604bca0d5be5dd52210c1dd9","name":"Simon","image":{"@type":"ImageObject","inLanguage":"en-US","@id":"https:\/\/www.fernandosimon.com\/blog\/#\/schema\/person\/image\/","url":"https:\/\/secure.gravatar.com\/avatar\/a3dbc48de62fffb1829befb4a588d789ec6dc5e05977afabb3407a5f37a16482?s=96&d=mm&r=g","contentUrl":"https:\/\/secure.gravatar.com\/avatar\/a3dbc48de62fffb1829befb4a588d789ec6dc5e05977afabb3407a5f37a16482?s=96&d=mm&r=g","caption":"Simon"},"sameAs":["http:\/\/www.fernandosimon.com"],"url":"https:\/\/www.fernandosimon.com\/blog\/author\/simon\/"}]}},"jetpack_publicize_connections":[],"jetpack_featured_media_url":"","jetpack_sharing_enabled":true,"jetpack_shortlink":"https:\/\/wp.me\/p5ofTp-87","_links":{"self":[{"href":"https:\/\/www.fernandosimon.com\/blog\/wp-json\/wp\/v2\/posts\/503","targetHints":{"allow":["GET"]}}],"collection":[{"href":"https:\/\/www.fernandosimon.com\/blog\/wp-json\/wp\/v2\/posts"}],"about":[{"href":"https:\/\/www.fernandosimon.com\/blog\/wp-json\/wp\/v2\/types\/post"}],"author":[{"embeddable":true,"href":"https:\/\/www.fernandosimon.com\/blog\/wp-json\/wp\/v2\/users\/2"}],"replies":[{"embeddable":true,"href":"https:\/\/www.fernandosimon.com\/blog\/wp-json\/wp\/v2\/comments?post=503"}],"version-history":[{"count":0,"href":"https:\/\/www.fernandosimon.com\/blog\/wp-json\/wp\/v2\/posts\/503\/revisions"}],"wp:attachment":[{"href":"https:\/\/www.fernandosimon.com\/blog\/wp-json\/wp\/v2\/media?parent=503"}],"wp:term":[{"taxonomy":"category","embeddable":true,"href":"https:\/\/www.fernandosimon.com\/blog\/wp-json\/wp\/v2\/categories?post=503"},{"taxonomy":"post_tag","embeddable":true,"href":"https:\/\/www.fernandosimon.com\/blog\/wp-json\/wp\/v2\/tags?post=503"}],"curies":[{"name":"wp","href":"https:\/\/api.w.org\/{rel}","templated":true}]}}