{"id":4485,"date":"2021-05-10T08:39:28","date_gmt":"2021-05-10T08:39:28","guid":{"rendered":"https:\/\/swiv.com.br\/sysbackup-administrative-privilege-for-oracle-multitenant\/"},"modified":"2026-05-27T20:02:32","modified_gmt":"2026-05-27T19:02:32","slug":"sysbackup-administrative-privilege-for-oracle-multitenant","status":"publish","type":"post","link":"https:\/\/swiv.com.br\/index.php\/2021\/05\/10\/sysbackup-administrative-privilege-for-oracle-multitenant\/","title":{"rendered":"Sysbackup Administrative Privilege for Oracle Multitenant"},"content":{"rendered":"\n<p>Na arquitetura Multitenant, tamb\u00e9m podemos usufruir do recurso de usu\u00e1rios (locais ou comuns) com privil\u00e9gio de sysbackup, ou seja, que dentre v\u00e1rios privil\u00e9gios, podem realizar as opera\u00e7\u00f5es de backup\/restore de um CDB ou PDBs. Neste artigo vamos realizar testes simples com este conceito.<\/p>\n\n\n\n<p>Criando um usu\u00e1rio local com privil\u00e9gio de sysbackup no PDB HIPOFISE1:<\/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@quiasma ~]$ sqlplus \/ as sysdba\n \nSQL*Plus: Release 18.0.0.0.0 - Production on Mon May 10 05:25:53 2021\nVersion 18.13.0.0.0\n \nCopyright (c) 1982, 2018, Oracle.  All rights reserved.\n \n \nConnected to:\nOracle Database 18c Enterprise Edition Release 18.0.0.0.0 - Production\nVersion 18.13.0.0.0\n \nSQL&gt; SELECT NAME,OPEN_MODE,CDB FROM V$DATABASE;\n \nNAME      OPEN_MODE            CDB\n--------- -------------------- ---\nTALAMO    READ WRITE           YES\n \nSQL&gt; SELECT NAME FROM V$PDBS;\n \nNAME\n--------------------------------------------------------------------------------\nPDB$SEED\nHIPOFISE1\nHIPOFISE2\nSPFC\n \nSQL&gt; ALTER SESSION SET CONTAINER=HIPOFISE1;\n \nSession altered.\n \nSQL&gt; CREATE USER BSS1 IDENTIFIED BY oracle CONTAINER=CURRENT;\n \nUser created.\n \nSQL&gt; GRANT SYSBACKUP TO BSS1 CONTAINER=CURRENT;\n \nGrant succeeded.\n<\/pre><\/div>\n\n\n<p>Como este usu\u00e1rio criado existe apenas no PDB HIPOFISE1, quando tentamos realizar a conex\u00e3o ao CDB root (TALAMO), o RMAN reporta que n\u00e3o \u00e9 poss\u00edvel:<\/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@quiasma ~]$ rman target &#039;&quot;BSS1\/oracle@TALAMO as sysbackup&quot;&#039;\n \nRecovery Manager: Release 18.0.0.0.0 - Production on Mon May 10 05:29:35 2021\nVersion 18.13.0.0.0\n \nCopyright (c) 1982, 2018, Oracle and\/or its affiliates.  All rights reserved.\n \nRMAN-00571: ===========================================================\nRMAN-00569: =============== ERROR MESSAGE STACK FOLLOWS ===============\nRMAN-00571: ===========================================================\nRMAN-00554: initialization of internal recovery manager package failed\nRMAN-04005: error from target database:\nORA-01017: invalid username\/password; logon denied\n<\/pre><\/div>\n\n\n<p>J\u00e1 no PDB HIPOFISE1 conseguimos conectar e realizar o backup da tablespace USERS do PDB:<\/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@quiasma ~]$ rman target &#039;&quot;BSS1\/oracle@HIPOFISE1 as sysbackup&quot;&#039;\n \nRecovery Manager: Release 18.0.0.0.0 - Production on Mon May 10 05:30:09 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: TALAMO:HIPOFISE1 (DBID=294818613)\n \nRMAN&gt; BACKUP TABLESPACE USERS;\n \nStarting backup at 10-MAY-21\nusing target database control file instead of recovery catalog\nallocated channel: ORA_DISK_1\nchannel ORA_DISK_1: SID=115 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=00088 name=\/oracle\/dados\/TALAMO\/BFC37CDFCB3A0CF9E0536A00A8C0C9C5\/datafile\/o1_mf_users_j7824z91_.dbf\nchannel ORA_DISK_1: starting piece 1 at 10-MAY-21\nchannel ORA_DISK_1: finished piece 1 at 10-MAY-21\npiece handle=\/oracle\/fra\/TALAMO\/BFC37CDFCB3A0CF9E0536A00A8C0C9C5\/backupset\/2021_05_10\/o1_mf_nnndf_TAG20210510T053106_j9kvtbf6_.bkp tag=TAG20210510T053106 comment=NONE\nchannel ORA_DISK_1: backup set complete, elapsed time: 00:00:01\nFinished backup at 10-MAY-21\n \nRMAN&gt; LIST BACKUP OF TABLESPACE USERS;\n \n \nList of Backup Sets\n===================\n \n \nBS Key  Type LV Size       Device Type Elapsed Time Completion Time\n------- ---- -- ---------- ----------- ------------ ---------------\n44      Full    1.05M      DISK        00:00:00     10-MAY-21\n        BP Key: 44   Status: AVAILABLE  Compressed: NO  Tag: TAG20210510T053106\n        Piece Name: \/oracle\/fra\/TALAMO\/BFC37CDFCB3A0CF9E0536A00A8C0C9C5\/backupset\/2021_05_10\/o1_mf_nnndf_TAG20210510T053106_j9kvtbf6_.bkp\n  List of Datafiles in backup set 44\n  File LV Type Ckp SCN    Ckp Time  Abs Fuz SCN Sparse Name\n  ---- -- ---- ---------- --------- ----------- ------ ----\n  88      Full 3698149    10-MAY-21              NO    \/oracle\/dados\/TALAMO\/BFC37CDFCB3A0CF9E0536A00A8C0C9C5\/datafile\/o1_mf_users_j7824z91_.dbf\n \nRMAN&gt; DELETE BACKUPSET;\n \nusing channel ORA_DISK_1\nskipping archived logs when connected to a PDB\n \nList of Backup Pieces\nBP Key  BS Key  Pc# Cp# Status      Device Type Piece Name\n------- ------- --- --- ----------- ----------- ----------\n44      44      1   1   AVAILABLE   DISK        \/oracle\/fra\/TALAMO\/BFC37CDFCB3A0CF9E0536A00A8C0C9C5\/backupset\/2021_05_10\/o1_mf_nnndf_TAG20210510T053106_j9kvtbf6_.bkp\n \nDo you really want to delete the above objects (enter YES or NO)? Y\ndeleted backup piece\nbackup piece handle=\/oracle\/fra\/TALAMO\/BFC37CDFCB3A0CF9E0536A00A8C0C9C5\/backupset\/2021_05_10\/o1_mf_nnndf_TAG20210510T053106_j9kvtbf6_.bkp RECID=44 STAMP=1072157466\nDeleted 1 objects\n<\/pre><\/div>\n\n\n<p>Criando um common user chamado ASWAN e concedendo privil\u00e9gio de sysbackup:<\/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@quiasma ~]$ sqlplus \/ as sysdba\n \nSQL*Plus: Release 18.0.0.0.0 - Production on Mon May 10 05:33:05 2021\nVersion 18.13.0.0.0\n \nCopyright (c) 1982, 2018, Oracle.  All rights reserved.\n \n \nConnected to:\nOracle Database 18c Enterprise Edition Release 18.0.0.0.0 - Production\nVersion 18.13.0.0.0\n \nSQL&gt; CREATE USER C##ASWAN IDENTIFIED BY oracle CONTAINER=ALL;\n \nUser created.\n \nSQL&gt; GRANT SYSBACKUP TO C##ASWAN CONTAINER=ALL;\n \nGrant succeeded.\n<\/pre><\/div>\n\n\n<p>Realizando backup da tablespace USERS do CDB$ROOT:<\/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@quiasma ~]$ rman target &#039;&quot;C##ASWAN\/oracle@TALAMO as sysbackup&quot;&#039;\n \nRecovery Manager: Release 18.0.0.0.0 - Production on Mon May 10 05:35:54 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: TALAMO (DBID=2194831545)\n \nRMAN&gt; BACKUP TABLESPACE USERS;\n \nStarting backup at 10-MAY-21\nusing target database control file instead of recovery catalog\nallocated channel: ORA_DISK_1\nchannel ORA_DISK_1: SID=111 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=00007 name=\/oracle\/dados\/TALAMO\/datafile\/o1_mf_users_j3w1czy4_.dbf\nchannel ORA_DISK_1: starting piece 1 at 10-MAY-21\nchannel ORA_DISK_1: finished piece 1 at 10-MAY-21\npiece handle=\/oracle\/fra\/TALAMO\/backupset\/2021_05_10\/o1_mf_nnndf_TAG20210510T053607_j9kw3qbf_.bkp tag=TAG20210510T053607 comment=NONE\nchannel ORA_DISK_1: backup set complete, elapsed time: 00:00:01\nFinished backup at 10-MAY-21\n \nStarting Control File and SPFILE Autobackup at 10-MAY-21\npiece handle=\/oracle\/fra\/TALAMO\/autobackup\/2021_05_10\/o1_mf_s_1072157768_j9kw3rw0_.bkp comment=NONE\nFinished Control File and SPFILE Autobackup at 10-MAY-21\n \nRMAN&gt; LIST BACKUP OF TABLESPACE USERS;\n \n \nList of Backup Sets\n===================\n \n \nBS Key  Type LV Size       Device Type Elapsed Time Completion Time\n------- ---- -- ---------- ----------- ------------ ---------------\n45      Full    1.05M      DISK        00:00:00     10-MAY-21\n        BP Key: 45   Status: AVAILABLE  Compressed: NO  Tag: TAG20210510T053607\n        Piece Name: \/oracle\/fra\/TALAMO\/backupset\/2021_05_10\/o1_mf_nnndf_TAG20210510T053607_j9kw3qbf_.bkp\n  List of Datafiles in backup set 45\n  File LV Type Ckp SCN    Ckp Time  Abs Fuz SCN Sparse Name\n  ---- -- ---- ---------- --------- ----------- ------ ----\n  7       Full 3699119    10-MAY-21              NO    \/oracle\/dados\/TALAMO\/datafile\/o1_mf_users_j3w1czy4_.dbf\n \nRMAN&gt; DELETE BACKUPSET;\n \nusing channel ORA_DISK_1\n \nList of Backup Pieces\nBP Key  BS Key  Pc# Cp# Status      Device Type Piece Name\n------- ------- --- --- ----------- ----------- ----------\n45      45      1   1   AVAILABLE   DISK        \/oracle\/fra\/TALAMO\/backupset\/2021_05_10\/o1_mf_nnndf_TAG20210510T053607_j9kw3qbf_.bkp\n46      46      1   1   AVAILABLE   DISK        \/oracle\/fra\/TALAMO\/autobackup\/2021_05_10\/o1_mf_s_1072157768_j9kw3rw0_.bkp\n \nDo you really want to delete the above objects (enter YES or NO)? Y\ndeleted backup piece\nbackup piece handle=\/oracle\/fra\/TALAMO\/backupset\/2021_05_10\/o1_mf_nnndf_TAG20210510T053607_j9kw3qbf_.bkp RECID=45 STAMP=1072157767\ndeleted backup piece\nbackup piece handle=\/oracle\/fra\/TALAMO\/autobackup\/2021_05_10\/o1_mf_s_1072157768_j9kw3rw0_.bkp RECID=46 STAMP=1072157768\nDeleted 2 objects\n<\/pre><\/div>\n\n\n<p>Conectando no PDB HIPOFISE1 e realizando o backup da tablespace USERS do PDB:<\/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@quiasma ~]$ rman target &#039;&quot;C##ASWAN\/oracle@HIPOFISE1 as sysbackup&quot;&#039;\n \nRecovery Manager: Release 18.0.0.0.0 - Production on Mon May 10 05:37:30 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: TALAMO:HIPOFISE1 (DBID=294818613)\n \nRMAN&gt; BACKUP TABLESPACE USERS;\n \nStarting backup at 10-MAY-21\nusing target database control file instead of recovery catalog\nallocated channel: ORA_DISK_1\nchannel ORA_DISK_1: SID=94 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=00088 name=\/oracle\/dados\/TALAMO\/BFC37CDFCB3A0CF9E0536A00A8C0C9C5\/datafile\/o1_mf_users_j7824z91_.dbf\nchannel ORA_DISK_1: starting piece 1 at 10-MAY-21\nchannel ORA_DISK_1: finished piece 1 at 10-MAY-21\npiece handle=\/oracle\/fra\/TALAMO\/BFC37CDFCB3A0CF9E0536A00A8C0C9C5\/backupset\/2021_05_10\/o1_mf_nnndf_TAG20210510T053741_j9kw6ovq_.bkp tag=TAG20210510T053741 comment=NONE\nchannel ORA_DISK_1: backup set complete, elapsed time: 00:00:01\nFinished backup at 10-MAY-21\n \nRMAN&gt; LIST BACKUP OF TABLESPACE USERS;\n \n \nList of Backup Sets\n===================\n \n \nBS Key  Type LV Size       Device Type Elapsed Time Completion Time\n------- ---- -- ---------- ----------- ------------ ---------------\n47      Full    1.05M      DISK        00:00:00     10-MAY-21\n        BP Key: 47   Status: AVAILABLE  Compressed: NO  Tag: TAG20210510T053741\n        Piece Name: \/oracle\/fra\/TALAMO\/BFC37CDFCB3A0CF9E0536A00A8C0C9C5\/backupset\/2021_05_10\/o1_mf_nnndf_TAG20210510T053741_j9kw6ovq_.bkp\n  List of Datafiles in backup set 47\n  File LV Type Ckp SCN    Ckp Time  Abs Fuz SCN Sparse Name\n  ---- -- ---- ---------- --------- ----------- ------ ----\n  88      Full 3699239    10-MAY-21              NO    \/oracle\/dados\/TALAMO\/BFC37CDFCB3A0CF9E0536A00A8C0C9C5\/datafile\/o1_mf_users_j7824z91_.dbf\n \nRMAN&gt; DELETE BACKUPSET;\n \nusing channel ORA_DISK_1\nskipping archived logs when connected to a PDB\n \nList of Backup Pieces\nBP Key  BS Key  Pc# Cp# Status      Device Type Piece Name\n------- ------- --- --- ----------- ----------- ----------\n47      47      1   1   AVAILABLE   DISK        \/oracle\/fra\/TALAMO\/BFC37CDFCB3A0CF9E0536A00A8C0C9C5\/backupset\/2021_05_10\/o1_mf_nnndf_TAG20210510T053741_j9kw6ovq_.bkp\n \nDo you really want to delete the above objects (enter YES or NO)? Y\ndeleted backup piece\nbackup piece handle=\/oracle\/fra\/TALAMO\/BFC37CDFCB3A0CF9E0536A00A8C0C9C5\/backupset\/2021_05_10\/o1_mf_nnndf_TAG20210510T053741_j9kw6ovq_.bkp RECID=47 STAMP=1072157861\nDeleted 1 objects\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>Na arquitetura Multitenant, tamb\u00e9m podemos usufruir do recurso de usu\u00e1rios (locais ou comuns) com privil\u00e9gio de sysbackup, ou seja, que dentre v\u00e1rios privil\u00e9gios, podem realizar as opera\u00e7\u00f5es de backup\/restore de um CDB ou PDBs. Neste artigo vamos realizar testes simples com este conceito. Criando um usu\u00e1rio local com privil\u00e9gio de sysbackup no PDB HIPOFISE1: Como [&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,8],"tags":[],"class_list":["post-4485","post","type-post","status-publish","format-standard","hentry","category-backup-recovery","category-multitenant"],"_links":{"self":[{"href":"https:\/\/swiv.com.br\/index.php\/wp-json\/wp\/v2\/posts\/4485","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=4485"}],"version-history":[{"count":1,"href":"https:\/\/swiv.com.br\/index.php\/wp-json\/wp\/v2\/posts\/4485\/revisions"}],"predecessor-version":[{"id":9144,"href":"https:\/\/swiv.com.br\/index.php\/wp-json\/wp\/v2\/posts\/4485\/revisions\/9144"}],"wp:attachment":[{"href":"https:\/\/swiv.com.br\/index.php\/wp-json\/wp\/v2\/media?parent=4485"}],"wp:term":[{"taxonomy":"category","embeddable":true,"href":"https:\/\/swiv.com.br\/index.php\/wp-json\/wp\/v2\/categories?post=4485"},{"taxonomy":"post_tag","embeddable":true,"href":"https:\/\/swiv.com.br\/index.php\/wp-json\/wp\/v2\/tags?post=4485"}],"curies":[{"name":"wp","href":"https:\/\/api.w.org\/{rel}","templated":true}]}}