{"id":3190,"date":"2021-03-26T08:53:54","date_gmt":"2021-03-26T08:53:54","guid":{"rendered":"https:\/\/swiv.com.br\/configuring-parallelism-in-default-channels\/"},"modified":"2026-05-27T20:02:49","modified_gmt":"2026-05-27T19:02:49","slug":"configuring-parallelism-in-default-channels","status":"publish","type":"post","link":"https:\/\/swiv.com.br\/index.php\/2021\/03\/26\/configuring-parallelism-in-default-channels\/","title":{"rendered":"Configuring Parallelism in Default Channels"},"content":{"rendered":"\n<p>O RMAN nos permite criar mais canais nas opera\u00e7\u00f5es de backup, trazendo mais flexibilidade e eventualmente mais performance. Digo eventualmente pois n\u00e3o podemos associar de maneira categ\u00f3rica que quanto maior o n\u00famero de canais, mais r\u00e1pido o backup finaliza. Dependendo da situa\u00e7\u00e3o (e em um exemplo extraordin\u00e1rio), se o destino de nossos backups possu\u00edrem apenas um storage driver, mesmo criando v\u00e1rios canais, todos eles ser\u00e3o executados nesse mesmo devide. Se isso acontecer, internamente o RMAN criar\u00e1 filas de execu\u00e7\u00e3o, e isso pode at\u00e9 comprometer a performance. Esse assunto em espec\u00edfico \u00e9 complexo e merece um artigo posterior para explora\u00e7\u00e3o. Neste aqui, vou me limitar a exibir como podemos criar os canais nas opera\u00e7\u00f5es de backup (que tem como padr\u00e3o apenas 1).<\/p>\n\n\n\n<p>Com o comando abaixo, podemos constatar o valor atual de nosso ambiente:<\/p>\n\n\n<div class=\"wp-block-syntaxhighlighter-code \\&quot;wp-block-syntaxhighlighter-code\\&quot;\"><pre class=\"brush: plain; title: ; notranslate\" title=\"\">\n&#x5B;oracle@oel8 ~]$ rman target \/\n \nRecovery Manager: Release 18.0.0.0.0 - Production on Fri Mar 26 05:18:59 2021\nVersion 18.13.0.0.0\n \nCopyright (c) 1982, 2018, Oracle and\/or its affiliates.  All rights reserved.\n \nconnected to target database: RMANDB (DBID=3825250984)\n \nRMAN&gt; SHOW DEVICE TYPE;\n \nusing target database control file instead of recovery catalog\nRMAN configuration parameters for database with db_unique_name RMANDB are:\nCONFIGURE DEVICE TYPE DISK PARALLELISM 1 BACKUP TYPE TO BACKUPSET; # default\n<\/pre><\/div>\n\n\n<p> Alterando o paralelismo:<\/p>\n\n\n<div class=\"wp-block-syntaxhighlighter-code \\&quot;wp-block-syntaxhighlighter-code\\&quot;\"><pre class=\"brush: plain; title: ; notranslate\" title=\"\">\nRMAN&gt; CONFIGURE DEVICE TYPE DISK PARALLELISM 2;\n \nnew RMAN configuration parameters:\nCONFIGURE DEVICE TYPE DISK PARALLELISM 2 BACKUP TYPE TO BACKUPSET;\nnew RMAN configuration parameters are successfully stored\n<\/pre><\/div>\n\n\n<p>Realizando um backup do banco de dados e confirmando a cria\u00e7\u00e3o de 2 canais (ORA_DISK_1 e ORA_DISK_2):<\/p>\n\n\n<div class=\"wp-block-syntaxhighlighter-code \\&quot;wp-block-syntaxhighlighter-code\\&quot;\"><pre class=\"brush: plain; title: ; notranslate\" title=\"\">\nRMAN&gt; BACKUP DATABASE;\n \nStarting backup at 2021-03-26:05:28:05\nallocated channel: ORA_DISK_1\nchannel ORA_DISK_1: SID=127 device type=DISK\nallocated channel: ORA_DISK_2\nchannel ORA_DISK_2: SID=82 device type=DISK\nchannel ORA_DISK_1: starting full datafile backup set\nchannel ORA_DISK_1: specifying datafile(s) in backup set\ninput datafile file number=00001 name=\/oracle\/dados\/RMANDB\/datafile\/o1_mf_system_h8nynqfx_.dbf\ninput datafile file number=00007 name=\/oracle\/dados\/RMANDB\/datafile\/o1_mf_users_h8nyrkn7_.dbf\ninput datafile file number=00005 name=\/oracle\/dados\/RMANDB\/datafile\/ts_cortex_catalog.dbf\nchannel ORA_DISK_1: starting piece 1 at 2021-03-26:05:28:06\nchannel ORA_DISK_2: starting full datafile backup set\nchannel ORA_DISK_2: specifying datafile(s) in backup set\ninput datafile file number=00003 name=\/oracle\/dados\/RMANDB\/datafile\/o1_mf_sysaux_h8nyq35q_.dbf\ninput datafile file number=00004 name=\/oracle\/dados\/RMANDB\/datafile\/o1_mf_undotbs1_h8nyrjdr_.dbf\nchannel ORA_DISK_2: starting piece 1 at 2021-03-26:05:28:06\nchannel ORA_DISK_2: finished piece 1 at 2021-03-26:05:29:39\npiece handle=\/oracle\/fra\/RMANDB\/backupset\/2021_03_26\/o1_mf_nnndf_TAG20210326T052806_j5v6rq92_.bkp tag=TAG20210326T052806 comment=NONE\nchannel ORA_DISK_2: backup set complete, elapsed time: 00:01:33\nchannel ORA_DISK_1: finished piece 1 at 2021-03-26:05:29:49\npiece handle=\/oracle\/fra\/RMANDB\/backupset\/2021_03_26\/o1_mf_nnndf_TAG20210326T052806_j5v6rpt5_.bkp tag=TAG20210326T052806 comment=NONE\nchannel ORA_DISK_1: backup set complete, elapsed time: 00:01:43\nFinished backup at 2021-03-26:05:29:49\n \nStarting Control File and SPFILE Autobackup at 2021-03-26:05:29:49\npiece handle=\/oracle\/fra\/RMANDB\/autobackup\/2021_03_26\/o1_mf_s_1068182989_j5v6vyf1_.bkp comment=NONE\nFinished Control File and SPFILE Autobackup at 2021-03-26:05:29:52\n<\/pre><\/div>\n\n\n<p>Podemos configurar manualmente cada canal, e at\u00e9 o seu destino com o FORMAT, vide exemplo abaixo:<\/p>\n\n\n<div class=\"wp-block-syntaxhighlighter-code \\&quot;wp-block-syntaxhighlighter-code\\&quot;\"><pre class=\"brush: plain; title: ; notranslate\" title=\"\">\nRMAN&gt; CONFIGURE CHANNEL 1 DEVICE TYPE DISK FORMAT &#039;\/oracle\/BACKUP\/BSS1\/%U.bkp&#039;;\n \nnew RMAN configuration parameters:\nCONFIGURE CHANNEL 1 DEVICE TYPE DISK FORMAT   &#039;\/oracle\/BACKUP\/BSS1\/%U.bkp&#039;;\nnew RMAN configuration parameters are successfully stored\nreleased channel: ORA_DISK_1\nreleased channel: ORA_DISK_2\n \nRMAN&gt; CONFIGURE CHANNEL 2 DEVICE TYPE DISK FORMAT &#039;\/oracle\/BACKUP\/BSS2\/%U.bkp&#039;;\n \nnew RMAN configuration parameters:\nCONFIGURE CHANNEL 2 DEVICE TYPE DISK FORMAT   &#039;\/oracle\/BACKUP\/BSS2\/%U.bkp&#039;;\nnew RMAN configuration parameters are successfully stored\n<\/pre><\/div>\n\n\n<p>Realizando o backup e confirmando que o RMAN criou 2 canais, e cada qual apontando para um diret\u00f3rio diferente:<\/p>\n\n\n<div class=\"wp-block-syntaxhighlighter-code \\&quot;wp-block-syntaxhighlighter-code\\&quot;\"><pre class=\"brush: plain; title: ; notranslate\" title=\"\">\nRMAN&gt; BACKUP DATABASE;\n \nStarting backup at 2021-03-26:05:43:47\nusing channel ORA_DISK_1\nusing channel ORA_DISK_2\nchannel ORA_DISK_1: starting full datafile backup set\nchannel ORA_DISK_1: specifying datafile(s) in backup set\ninput datafile file number=00001 name=\/oracle\/dados\/RMANDB\/datafile\/o1_mf_system_h8nynqfx_.dbf\ninput datafile file number=00007 name=\/oracle\/dados\/RMANDB\/datafile\/o1_mf_users_h8nyrkn7_.dbf\ninput datafile file number=00005 name=\/oracle\/dados\/RMANDB\/datafile\/ts_cortex_catalog.dbf\nchannel ORA_DISK_1: starting piece 1 at 2021-03-26:05:43:48\nchannel ORA_DISK_2: starting full datafile backup set\nchannel ORA_DISK_2: specifying datafile(s) in backup set\ninput datafile file number=00003 name=\/oracle\/dados\/RMANDB\/datafile\/o1_mf_sysaux_h8nyq35q_.dbf\ninput datafile file number=00004 name=\/oracle\/dados\/RMANDB\/datafile\/o1_mf_undotbs1_h8nyrjdr_.dbf\nchannel ORA_DISK_2: starting piece 1 at 2021-03-26:05:43:48\nchannel ORA_DISK_1: finished piece 1 at 2021-03-26:05:44:33\npiece handle=\/oracle\/BACKUP\/BSS1\/6evqmc8k_1_1.bkp tag=TAG20210326T054347 comment=NONE\nchannel ORA_DISK_1: backup set complete, elapsed time: 00:00:45\nchannel ORA_DISK_2: finished piece 1 at 2021-03-26:05:44:33\npiece handle=\/oracle\/BACKUP\/BSS2\/6fvqmc8k_1_1.bkp tag=TAG20210326T054347 comment=NONE\nchannel ORA_DISK_2: backup set complete, elapsed time: 00:00:45\nFinished backup at 2021-03-26:05:44:33\n \nStarting Control File and SPFILE Autobackup at 2021-03-26:05:44:33\npiece handle=\/oracle\/fra\/RMANDB\/autobackup\/2021_03_26\/o1_mf_s_1068183873_j5v7ql04_.bkp comment=NONE\nFinished Control File and SPFILE Autobackup at 2021-03-26:05:44:36\n<\/pre><\/div>\n\n\n<p>Para resetar as configura\u00e7\u00f5es:<\/p>\n\n\n<div class=\"wp-block-syntaxhighlighter-code \\&quot;wp-block-syntaxhighlighter-code\\&quot;\"><pre class=\"brush: plain; title: ; notranslate\" title=\"\">\nRMAN&gt; CONFIGURE DEVICE TYPE disk CLEAR;\n \nold RMAN configuration parameters:\nCONFIGURE DEVICE TYPE DISK PARALLELISM 2 BACKUP TYPE TO BACKUPSET;\nRMAN configuration parameters are successfully reset to default value\nreleased channel: ORA_DISK_1\nreleased channel: ORA_DISK_2\n \nRMAN&gt; SHOW DEVICE TYPE;\n \nRMAN configuration parameters for database with db_unique_name RMANDB are:\nconfiguration for DISK channel 2 is ignored\nCONFIGURE DEVICE TYPE DISK PARALLELISM 1 BACKUP TYPE TO BACKUPSET; # default\n<\/pre><\/div>\n\n\n<p>Tamb\u00e9m temos a op\u00e7\u00e3o de definir o n\u00famero de canais em tempo de execu\u00e7\u00e3o, dentro de um bloco RUN do RMAN, conforme exemplo abaixo:<\/p>\n\n\n<div class=\"wp-block-syntaxhighlighter-code \\&quot;wp-block-syntaxhighlighter-code\\&quot;\"><pre class=\"brush: plain; title: ; notranslate\" title=\"\">\nRMAN&gt; RUN\n {\n        ALLOCATE CHANNEL ch1 DEVICE TYPE DISK FORMAT &#039;\/oracle\/BACKUP\/BSS1\/%U.bkp&#039;;\n        ALLOCATE CHANNEL ch2 DEVICE TYPE DISK FORMAT &#039;\/oracle\/BACKUP\/BSS2\/%U.bkp&#039;;\n        BACKUP DATABASE;\n }2&gt; 3&gt; 4&gt; 5&gt; 6&gt;\n \nreleased channel: ORA_DISK_1\nallocated channel: ch1\nchannel ch1: SID=127 device type=DISK\n \nallocated channel: ch2\nchannel ch2: SID=82 device type=DISK\n \nStarting backup at 2021-03-26:05:51:04\nchannel ch1: starting full datafile backup set\nchannel ch1: specifying datafile(s) in backup set\ninput datafile file number=00001 name=\/oracle\/dados\/RMANDB\/datafile\/o1_mf_system_h8nynqfx_.dbf\ninput datafile file number=00007 name=\/oracle\/dados\/RMANDB\/datafile\/o1_mf_users_h8nyrkn7_.dbf\ninput datafile file number=00005 name=\/oracle\/dados\/RMANDB\/datafile\/ts_cortex_catalog.dbf\nchannel ch1: starting piece 1 at 2021-03-26:05:51:04\nchannel ch2: starting full datafile backup set\nchannel ch2: specifying datafile(s) in backup set\ninput datafile file number=00003 name=\/oracle\/dados\/RMANDB\/datafile\/o1_mf_sysaux_h8nyq35q_.dbf\ninput datafile file number=00004 name=\/oracle\/dados\/RMANDB\/datafile\/o1_mf_undotbs1_h8nyrjdr_.dbf\nchannel ch2: starting piece 1 at 2021-03-26:05:51:04\nchannel ch1: finished piece 1 at 2021-03-26:05:51:29\npiece handle=\/oracle\/BACKUP\/BSS1\/6hvqmcm8_1_1.bkp tag=TAG20210326T055104 comment=NONE\nchannel ch1: backup set complete, elapsed time: 00:00:25\nchannel ch2: finished piece 1 at 2021-03-26:05:51:29\npiece handle=\/oracle\/BACKUP\/BSS2\/6ivqmcm8_1_1.bkp tag=TAG20210326T055104 comment=NONE\nchannel ch2: backup set complete, elapsed time: 00:00:25\nFinished backup at 2021-03-26:05:51:29\n \nStarting Control File and SPFILE Autobackup at 2021-03-26:05:51:29\npiece handle=\/oracle\/fra\/RMANDB\/autobackup\/2021_03_26\/o1_mf_s_1068184289_j5v84l6p_.bkp comment=NONE\nFinished Control File and SPFILE Autobackup at 2021-03-26:05:51:32\nreleased channel: ch1\nreleased channel: ch2\n<\/pre><\/div>\n\n\n<p>Obs: Este procedimento foi criado pelo senhor Ahmed Baraka (www.ahmedbaraka.com) e foi apenas reproduzido por mim em um laborat\u00f3rio pessoal para fins de aprendizado.<\/p>\n","protected":false},"excerpt":{"rendered":"<p>O RMAN nos permite criar mais canais nas opera\u00e7\u00f5es de backup, trazendo mais flexibilidade e eventualmente mais performance. Digo eventualmente pois n\u00e3o podemos associar de maneira categ\u00f3rica que quanto maior o n\u00famero de canais, mais r\u00e1pido o backup finaliza. Dependendo da situa\u00e7\u00e3o (e em um exemplo extraordin\u00e1rio), se o destino de nossos backups possu\u00edrem apenas [&hellip;]<\/p>\n","protected":false},"author":1,"featured_media":0,"comment_status":"closed","ping_status":"open","sticky":false,"template":"","format":"standard","meta":{"footnotes":""},"categories":[3],"tags":[],"class_list":["post-3190","post","type-post","status-publish","format-standard","hentry","category-backup-recovery"],"_links":{"self":[{"href":"https:\/\/swiv.com.br\/index.php\/wp-json\/wp\/v2\/posts\/3190","targetHints":{"allow":["GET"]}}],"collection":[{"href":"https:\/\/swiv.com.br\/index.php\/wp-json\/wp\/v2\/posts"}],"about":[{"href":"https:\/\/swiv.com.br\/index.php\/wp-json\/wp\/v2\/types\/post"}],"author":[{"embeddable":true,"href":"https:\/\/swiv.com.br\/index.php\/wp-json\/wp\/v2\/users\/1"}],"replies":[{"embeddable":true,"href":"https:\/\/swiv.com.br\/index.php\/wp-json\/wp\/v2\/comments?post=3190"}],"version-history":[{"count":1,"href":"https:\/\/swiv.com.br\/index.php\/wp-json\/wp\/v2\/posts\/3190\/revisions"}],"predecessor-version":[{"id":9201,"href":"https:\/\/swiv.com.br\/index.php\/wp-json\/wp\/v2\/posts\/3190\/revisions\/9201"}],"wp:attachment":[{"href":"https:\/\/swiv.com.br\/index.php\/wp-json\/wp\/v2\/media?parent=3190"}],"wp:term":[{"taxonomy":"category","embeddable":true,"href":"https:\/\/swiv.com.br\/index.php\/wp-json\/wp\/v2\/categories?post=3190"},{"taxonomy":"post_tag","embeddable":true,"href":"https:\/\/swiv.com.br\/index.php\/wp-json\/wp\/v2\/tags?post=3190"}],"curies":[{"name":"wp","href":"https:\/\/api.w.org\/{rel}","templated":true}]}}