{"id":5581,"date":"2021-06-25T08:11:23","date_gmt":"2021-06-25T08:11:23","guid":{"rendered":"https:\/\/swiv.com.br\/configuring-tde-transparent-data-encryption-for-rman-operations\/"},"modified":"2026-05-27T20:02:31","modified_gmt":"2026-05-27T19:02:31","slug":"configuring-tde-transparent-data-encryption-for-rman-operations","status":"publish","type":"post","link":"https:\/\/swiv.com.br\/index.php\/2021\/06\/25\/configuring-tde-transparent-data-encryption-for-rman-operations\/","title":{"rendered":"Configuring TDE (Transparent Data Encryption) for RMAN operations"},"content":{"rendered":"\n<p>Das 3 op\u00e7\u00f5es para utilizar criptografia no RMAN (Transparent Encryption, Password Encryption e Dual Mode encryption), em 2 delas \u00e9 necess\u00e1rio ter o TDE (Transparent Data Encryption) habilitado no banco de dados. Neste artigo vamos abordar essa configura\u00e7\u00e3o m\u00ednima para que o recurso possa ser utilizado.<\/p>\n\n\n\n<p>Criando um diret\u00f3rio onde o conte\u00fado de keystore ser\u00e1 hospedado:<\/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 RMANDB]$ pwd\n\/oracle\/dados\/RMANDB\n&#x5B;oracle@oel8 RMANDB]$ mkdir keystore\n&#x5B;oracle@oel8 RMANDB]$ cd keystore\/\n&#x5B;oracle@oel8 keystore]$ pwd\n\/oracle\/dados\/RMANDB\/keystore\n<\/pre><\/div>\n\n\n<p>Com o usu\u00e1rio de S.O que \u00e9 o owner do banco de dados, vamos editar o arquivo sqlnet.ora adicionando o conte\u00fado abaixo:<\/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 keystore]$ cd $ORACLE_HOME\/network\/admin\n&#x5B;oracle@oel8 admin]$ vi sqlnet.ora\n<\/pre><\/div>\n\n<div class=\"wp-block-syntaxhighlighter-code \\&quot;wp-block-syntaxhighlighter-code\\&quot;\"><pre class=\"brush: plain; title: ; notranslate\" title=\"\">\nENCRYPTION_WALLET_LOCATION =  \n(SOURCE =\n (METHOD = FILE)  (METHOD_DATA =\n (DIRECTORY = \/oracle\/dados\/RMANDB\/keystore)))\n<\/pre><\/div>\n\n\n<p>Conte\u00fado do arquivo:<\/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 admin]$ cat sqlnet.ora\n# sqlnet.ora Network Configuration File: \/oracle\/18.0.0\/product\/network\/admin\/sqlnet.ora\n# Generated by Oracle configuration tools.\n \nNAMES.DIRECTORY_PATH= (TNSNAMES,EZCONNECT)\n \nENCRYPTION_WALLET_LOCATION =\n(SOURCE =\n (METHOD = FILE)  (METHOD_DATA =\n (DIRECTORY = \/oracle\/dados\/RMANDB\/keystore)))\n&#x5B;oracle@oel8 admin]$\n<\/pre><\/div>\n\n\n<p>Logando no banco de dados e criando o Keystore:<\/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 admin]$ sqlplus \/ as sysdba\n \nSQL*Plus: Release 18.0.0.0.0 - Production on Fri Jun 25 05:02:33 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; ADMINISTER KEY MANAGEMENT CREATE KEYSTORE &#039;\/oracle\/dados\/RMANDB\/keystore&#039; IDENTIFIED BY oracle;\n \nkeystore altered.\n<\/pre><\/div>\n\n\n<p>Podemos notar que um arquivo (ewallet.p12) j\u00e1 foi criado em nosso diret\u00f3rio:<\/p>\n\n\n<div class=\"wp-block-syntaxhighlighter-code \\&quot;wp-block-syntaxhighlighter-code\\&quot;\"><pre class=\"brush: plain; title: ; notranslate\" title=\"\">\nSQL&gt; ! ls -al \/oracle\/dados\/RMANDB\/keystore\ntotal 4\ndrwxr-xr-x. 2 oracle oinstall   25 Jun 25 05:02 .\ndrwxr-x---. 9 oracle oinstall  126 Jun 25 04:57 ..\n-rw-------. 1 oracle oinstall 2555 Jun 25 05:02 ewallet.p12\n<\/pre><\/div>\n\n\n<p>De posse da senha que usamos para criar o Keystore, agora podemos fazer a sua abertura:<\/p>\n\n\n<div class=\"wp-block-syntaxhighlighter-code \\&quot;wp-block-syntaxhighlighter-code\\&quot;\"><pre class=\"brush: plain; title: ; notranslate\" title=\"\">\nSQL&gt; ADMINISTER KEY MANAGEMENT SET KEYSTORE OPEN IDENTIFIED BY oracle;\n \nkeystore altered.\n<\/pre><\/div>\n\n\n<p>Por fim, podemos criar um master encryption key que usaremos em artigos posteriores para as opera\u00e7\u00f5es dentro do RMAN. Mas \u00e9 importante citar que o recurso do TDE pode ser usado para criptografia de informa\u00e7\u00f5es do banco de dados, e n\u00e3o s\u00f3 os seus backups:<\/p>\n\n\n<div class=\"wp-block-syntaxhighlighter-code \\&quot;wp-block-syntaxhighlighter-code\\&quot;\"><pre class=\"brush: plain; title: ; notranslate\" title=\"\">\nSQL&gt; ADMINISTER KEY MANAGEMENT SET KEY IDENTIFIED BY oracle WITH BACKUP USING &#039;RMAN&#039;;\n \nkeystore altered.\n<\/pre><\/div>\n\n\n<p>Podemos at\u00e9 consultar as chaves existentes com a query abaixo:<\/p>\n\n\n<div class=\"wp-block-syntaxhighlighter-code \\&quot;wp-block-syntaxhighlighter-code\\&quot;\"><pre class=\"brush: plain; title: ; notranslate\" title=\"\">\nSQL&gt; SELECT KEY_ID FROM V$ENCRYPTION_KEYS;\n \nKEY_ID\n------------------------------------------------------------------------------\nAT9N7czvLk\/pv70\/WkuP9SIAAAAAAAAAAAAAAAAAAAAAAAAAAAAA\n<\/pre><\/div>\n\n\n<p>E consultando o nosso diret\u00f3rio, j\u00e1 temos um arquivo novo:<\/p>\n\n\n<div class=\"wp-block-syntaxhighlighter-code \\&quot;wp-block-syntaxhighlighter-code\\&quot;\"><pre class=\"brush: plain; title: ; notranslate\" title=\"\">\nSQL&gt; ! ls -al \/oracle\/dados\/RMANDB\/keystore\ntotal 8\ndrwxr-xr-x. 2 oracle oinstall   66 Jun 25 05:06 .\ndrwxr-x---. 9 oracle oinstall  126 Jun 25 04:57 ..\n-rw-------. 1 oracle oinstall 2555 Jun 25 05:06 ewallet_2021062508065797_RMAN.p12\n-rw-------. 1 oracle oinstall 3995 Jun 25 05:06 ewallet.p12\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>Das 3 op\u00e7\u00f5es para utilizar criptografia no RMAN (Transparent Encryption, Password Encryption e Dual Mode encryption), em 2 delas \u00e9 necess\u00e1rio ter o TDE (Transparent Data Encryption) habilitado no banco de dados. Neste artigo vamos abordar essa configura\u00e7\u00e3o m\u00ednima para que o recurso possa ser utilizado. Criando um diret\u00f3rio onde o conte\u00fado de keystore ser\u00e1 [&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-5581","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\/5581","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=5581"}],"version-history":[{"count":1,"href":"https:\/\/swiv.com.br\/index.php\/wp-json\/wp\/v2\/posts\/5581\/revisions"}],"predecessor-version":[{"id":9094,"href":"https:\/\/swiv.com.br\/index.php\/wp-json\/wp\/v2\/posts\/5581\/revisions\/9094"}],"wp:attachment":[{"href":"https:\/\/swiv.com.br\/index.php\/wp-json\/wp\/v2\/media?parent=5581"}],"wp:term":[{"taxonomy":"category","embeddable":true,"href":"https:\/\/swiv.com.br\/index.php\/wp-json\/wp\/v2\/categories?post=5581"},{"taxonomy":"post_tag","embeddable":true,"href":"https:\/\/swiv.com.br\/index.php\/wp-json\/wp\/v2\/tags?post=5581"}],"curies":[{"name":"wp","href":"https:\/\/api.w.org\/{rel}","templated":true}]}}