{"id":3650,"date":"2021-04-10T08:10:07","date_gmt":"2021-04-10T08:10:07","guid":{"rendered":"https:\/\/swiv.com.br\/obtaining-information-about-rman-backups-using-report-command\/"},"modified":"2026-05-27T20:02:33","modified_gmt":"2026-05-27T19:02:33","slug":"obtaining-information-about-rman-backups-using-report-command","status":"publish","type":"post","link":"https:\/\/swiv.com.br\/index.php\/2021\/04\/10\/obtaining-information-about-rman-backups-using-report-command\/","title":{"rendered":"Obtaining information about RMAN backups using REPORT command"},"content":{"rendered":"\n<p>Outro recurso para obtermos informa\u00e7\u00f5es relacionadas com o RMAN, \u00e9 usando o comando REPORT. No exemplo abaixo, podemos checar tamb\u00e9m as caracter\u00edstica do banco de dados, como os datafiles que o comp\u00f5em, as tablespaces atribu\u00eddas, o tamanho, etc:<\/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 Apr 9 20:08:13 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; REPORT SCHEMA;\n \nusing target database control file instead of recovery catalog\nReport of database schema for database with db_unique_name RMANDB\n \nList of Permanent Datafiles\n===========================\nFile Size(MB) Tablespace           RB segs Datafile Name\n---- -------- -------------------- ------- ------------------------\n1    860      SYSTEM               YES     \/oracle\/dados\/RMANDB\/datafile\/o1_mf_system_h8nynqfx_.dbf\n3    630      SYSAUX               NO      \/oracle\/dados\/RMANDB\/datafile\/o1_mf_sysaux_h8nyq35q_.dbf\n4    305      UNDOTBS1             YES     \/oracle\/dados\/RMANDB\/datafile\/o1_mf_undotbs1_h8nyrjdr_.dbf\n5    200      TS_CORTEX_CATALOG    NO      \/oracle\/dados\/RMANDB\/datafile\/ts_cortex_catalog.dbf\n7    5        USERS                NO      \/oracle\/dados\/RMANDB\/datafile\/o1_mf_users_h8nyrkn7_.dbf\n \nList of Temporary Files\n=======================\nFile Size(MB) Tablespace           Maxsize(MB) Tempfile Name\n---- -------- -------------------- ----------- --------------------\n1    32       TEMP                 32767       \/oracle\/dados\/RMANDB\/datafile\/o1_mf_temp_h8nyvt1f_.tmp\n \nRMAN&gt;\n<\/pre><\/div>\n\n\n<p>Tamb\u00e9m temos algumas op\u00e7\u00f5es do comando report schema, como utilizar os par\u00e2metros de data, SCN, Sequence e DB_UNIQUE_NAME, conforme exemplos abaixo. Por\u00e9m, como nosso ambiente ainda n\u00e3o possui um cat\u00e1logo configurado, os comandos reportam erro. Os coloquei aqui como men\u00e7\u00e3o de exist\u00eancia, mas em artigos posteriores, os mostrarei funcionando junto ao cat\u00e1logo:<\/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; REPORT SCHEMA AT TIME &#039;SYSDATE-1&#039;;\n \nRMAN-00571: ===========================================================\nRMAN-00569: =============== ERROR MESSAGE STACK FOLLOWS ===============\nRMAN-00571: ===========================================================\nRMAN-03002: failure of report command at 04\/09\/2021 20:19:06\nRMAN-06137: must have recovery catalog for REPORT SCHEMA AT TIME\n \nRMAN&gt; REPORT SCHEMA AT SCN 100;\n \nRMAN-00571: ===========================================================\nRMAN-00569: =============== ERROR MESSAGE STACK FOLLOWS ===============\nRMAN-00571: ===========================================================\nRMAN-03002: failure of report command at 04\/09\/2021 20:19:19\nRMAN-06137: must have recovery catalog for REPORT SCHEMA AT TIME\n \nRMAN&gt; REPORT SCHEMA AT SEQUENCE 100 THREAD 1;\n \nRMAN-00571: ===========================================================\nRMAN-00569: =============== ERROR MESSAGE STACK FOLLOWS ===============\nRMAN-00571: ===========================================================\nRMAN-03002: failure of report command at 04\/09\/2021 20:19:25\nRMAN-06137: must have recovery catalog for REPORT SCHEMA AT TIME\n \nRMAN&gt; REPORT SCHEMA FOR DB_UNIQUE_NAME RMANDB;\n \nRMAN-00571: ===========================================================\nRMAN-00569: =============== ERROR MESSAGE STACK FOLLOWS ===============\nRMAN-00571: ===========================================================\nRMAN-03002: failure of report command at 04\/09\/2021 20:19:31\nRMAN-05037: FOR DB_UNIQUE_NAME option cannot be used in nocatalog mode\n<\/pre><\/div>\n\n\n<p>Vamos criar uma tablespace nova para simular algumas situa\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; SQL &#039;CREATE TABLESPACE BSS&#039;;\n \nsql statement: CREATE TABLESPACE BSS\n<\/pre><\/div>\n\n\n<p>O comando a seguir nos indica os conte\u00fados que ainda n\u00e3o foram contemplados com o backup, exibindo desse modo o datafile criado acima (resultado da cria\u00e7\u00e3o da tablespace):<\/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; REPORT NEED BACKUP;\n \nRMAN retention policy will be applied to the command\nRMAN retention policy is set to redundancy 2\nReport of files with less than 2 redundant backups\nFile #bkps Name\n---- ----- -----------------------------------------------------\n2    0     \/oracle\/dados\/RMANDB\/datafile\/o1_mf_bss_j71qto1x_.dbf\n<\/pre><\/div>\n\n\n<p>Tamb\u00e9m podemos usar este comando com outros par\u00e2metros, como o device type, por tablespace, redund\u00e2ncia, e at\u00e9 realizando o skip de tablespace:<\/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; SHOW RETENTION POLICY;\n \nRMAN configuration parameters for database with db_unique_name RMANDB are:\nCONFIGURE RETENTION POLICY TO REDUNDANCY 2;\n \nRMAN&gt; REPORT NEED BACKUP REDUNDANCY 1 DATABASE SKIP TABLESPACE BSS;\n \nReport of files with less than 1 redundant backups\nFile #bkps Name\n---- ----- -----------------------------------------------------\n \nRMAN&gt; REPORT NEED BACKUP REDUNDANCY 2 DATABASE SKIP TABLESPACE BSS;\n \nReport of files with less than 2 redundant backups\nFile #bkps Name\n---- ----- -----------------------------------------------------\n \nRMAN&gt; REPORT NEED BACKUP REDUNDANCY 2 DATABASE SKIP TABLESPACE USERS;\n \nReport of files with less than 2 redundant backups\nFile #bkps Name\n---- ----- -----------------------------------------------------\n2    0     \/oracle\/dados\/RMANDB\/datafile\/o1_mf_bss_j71qto1x_.dbf\n<\/pre><\/div>\n\n<div class=\"wp-block-syntaxhighlighter-code \\&quot;wp-block-syntaxhighlighter-code\\&quot;\"><pre class=\"brush: plain; title: ; notranslate\" title=\"\">\nRMAN&gt; REPORT NEED BACKUP REDUNDANCY 1 DATAFILE 2;\n \nReport of files with less than 1 redundant backups\nFile #bkps Name\n---- ----- -----------------------------------------------------\n2    0     \/oracle\/dados\/RMANDB\/datafile\/o1_mf_bss_j71qto1x_.dbf\n<\/pre><\/div>\n\n<div class=\"wp-block-syntaxhighlighter-code \\&quot;wp-block-syntaxhighlighter-code\\&quot;\"><pre class=\"brush: plain; title: ; notranslate\" title=\"\">\nRMAN&gt; REPORT NEED BACKUP DEVICE TYPE DISK;\n \nRMAN retention policy will be applied to the command\nRMAN retention policy is set to redundancy 2\nReport of files with less than 2 redundant backups\nFile #bkps Name\n---- ----- -----------------------------------------------------\n2    0     \/oracle\/dados\/RMANDB\/datafile\/o1_mf_bss_j71qto1x_.dbf\n<\/pre><\/div>\n\n<div class=\"wp-block-syntaxhighlighter-code \\&quot;wp-block-syntaxhighlighter-code\\&quot;\"><pre class=\"brush: plain; title: ; notranslate\" title=\"\">\nRMAN&gt; REPORT NEED BACKUP REDUNDANCY 1 DEVICE TYPE DISK;\n \nReport of files with less than 1 redundant backups\nFile #bkps Name\n---- ----- -----------------------------------------------------\n2    0     \/oracle\/dados\/RMANDB\/datafile\/o1_mf_bss_j71qto1x_.dbf\n<\/pre><\/div>\n\n<div class=\"wp-block-syntaxhighlighter-code \\&quot;wp-block-syntaxhighlighter-code\\&quot;\"><pre class=\"brush: plain; title: ; notranslate\" title=\"\">\nRMAN&gt; REPORT NEED BACKUP TABLESPACE USERS DEVICE TYPE SBT;\n \nRMAN retention policy will be applied to the command\nRMAN retention policy is set to redundancy 2\nReport of files with less than 2 redundant backups\nFile #bkps Name\n---- ----- -----------------------------------------------------\n7    0     \/oracle\/dados\/RMANDB\/datafile\/o1_mf_users_h8nyrkn7_.dbf\n<\/pre><\/div>\n\n\n<p>Realizando o backup da tablespace BSS:<\/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 TABLESPACE BSS;\n \nStarting backup at 2021-04-09:20:41:04\nallocated channel: ORA_DISK_1\nchannel ORA_DISK_1: SID=68 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=00002 name=\/oracle\/dados\/RMANDB\/datafile\/o1_mf_bss_j71qto1x_.dbf\nchannel ORA_DISK_1: starting piece 1 at 2021-04-09:20:41:05\nchannel ORA_DISK_1: finished piece 1 at 2021-04-09:20:41:06\npiece handle=\/oracle\/fra\/RMANDB\/backupset\/2021_04_09\/o1_mf_nnndf_TAG20210409T204104_j71sjk5l_.bkp tag=TAG20210409T204104 comment=NONE\nchannel ORA_DISK_1: backup set complete, elapsed time: 00:00:01\nFinished backup at 2021-04-09:20:41:06\n \nStarting Control File and SPFILE Autobackup at 2021-04-09:20:41:06\npiece handle=\/oracle\/fra\/RMANDB\/autobackup\/2021_04_09\/o1_mf_s_1069447266_j71sjlrt_.bkp comment=NONE\nFinished Control File and SPFILE Autobackup at 2021-04-09:20:41:09\n<\/pre><\/div>\n\n\n<p>Como a nossa reten\u00e7\u00e3o est\u00e1 em 2 backups, o datafile ainda \u00e9 reportado no comando 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; REPORT NEED BACKUP;\n \nRMAN retention policy will be applied to the command\nRMAN retention policy is set to redundancy 2\nReport of files with less than 2 redundant backups\nFile #bkps Name\n---- ----- -----------------------------------------------------\n2    1     \/oracle\/dados\/RMANDB\/datafile\/o1_mf_bss_j71qto1x_.dbf\n<\/pre><\/div>\n\n\n<p>Realizando outro backup da mesma tablespace:<\/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 TABLESPACE BSS;\n \nStarting backup at 2021-04-09:20:45:44\nusing channel ORA_DISK_1\nchannel ORA_DISK_1: starting full datafile backup set\nchannel ORA_DISK_1: specifying datafile(s) in backup set\ninput datafile file number=00002 name=\/oracle\/dados\/RMANDB\/datafile\/o1_mf_bss_j71qto1x_.dbf\nchannel ORA_DISK_1: starting piece 1 at 2021-04-09:20:45:44\nchannel ORA_DISK_1: finished piece 1 at 2021-04-09:20:45:45\npiece handle=\/oracle\/fra\/RMANDB\/backupset\/2021_04_09\/o1_mf_nnndf_TAG20210409T204544_j71ss8jf_.bkp tag=TAG20210409T204544 comment=NONE\nchannel ORA_DISK_1: backup set complete, elapsed time: 00:00:01\nFinished backup at 2021-04-09:20:45:45\n \nStarting Control File and SPFILE Autobackup at 2021-04-09:20:45:45\npiece handle=\/oracle\/fra\/RMANDB\/autobackup\/2021_04_09\/o1_mf_s_1069447545_j71ssb5n_.bkp comment=NONE\nFinished Control File and SPFILE Autobackup at 2021-04-09:20:45:48\n<\/pre><\/div>\n\n\n<p>Nenhum datafile \u00e9 reportado dessa vez:<\/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; REPORT NEED BACKUP;\n \nRMAN retention policy will be applied to the command\nRMAN retention policy is set to redundancy 2\nReport of files with less than 2 redundant backups\nFile #bkps Name\n---- ----- -----------------------------------------------------\n<\/pre><\/div>\n\n\n<p>Se mudarmos o valor de reten\u00e7\u00e3o em tempo de execu\u00e7\u00e3o para 3, o datafile \u00e9 reportado novamente:<\/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; REPORT NEED BACKUP REDUNDANCY 3 DATAFILE 2;\n \nReport of files with less than 3 redundant backups\nFile #bkps Name\n---- ----- -----------------------------------------------------\n2    2     \/oracle\/dados\/RMANDB\/datafile\/o1_mf_bss_j71qto1x_.dbf\n<\/pre><\/div>\n\n\n<p>Removendo tablespace:<\/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; SQL &#039;DROP TABLESPACE BSS INCLUDING CONTENTS AND DATAFILES&#039;;\n \nsql statement: DROP TABLESPACE BSS INCLUDING CONTENTS AND DATAFILES\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>Outro recurso para obtermos informa\u00e7\u00f5es relacionadas com o RMAN, \u00e9 usando o comando REPORT. No exemplo abaixo, podemos checar tamb\u00e9m as caracter\u00edstica do banco de dados, como os datafiles que o comp\u00f5em, as tablespaces atribu\u00eddas, o tamanho, etc: Tamb\u00e9m temos algumas op\u00e7\u00f5es do comando report schema, como utilizar os par\u00e2metros de data, SCN, Sequence e [&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-3650","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\/3650","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=3650"}],"version-history":[{"count":1,"href":"https:\/\/swiv.com.br\/index.php\/wp-json\/wp\/v2\/posts\/3650\/revisions"}],"predecessor-version":[{"id":9181,"href":"https:\/\/swiv.com.br\/index.php\/wp-json\/wp\/v2\/posts\/3650\/revisions\/9181"}],"wp:attachment":[{"href":"https:\/\/swiv.com.br\/index.php\/wp-json\/wp\/v2\/media?parent=3650"}],"wp:term":[{"taxonomy":"category","embeddable":true,"href":"https:\/\/swiv.com.br\/index.php\/wp-json\/wp\/v2\/categories?post=3650"},{"taxonomy":"post_tag","embeddable":true,"href":"https:\/\/swiv.com.br\/index.php\/wp-json\/wp\/v2\/tags?post=3650"}],"curies":[{"name":"wp","href":"https:\/\/api.w.org\/{rel}","templated":true}]}}