{"id":2733,"date":"2021-03-16T13:31:48","date_gmt":"2021-03-16T13:31:48","guid":{"rendered":"https:\/\/swiv.com.br\/modifying-a-parameter-in-a-oracle-pdb\/"},"modified":"2026-05-27T20:02:50","modified_gmt":"2026-05-27T19:02:50","slug":"modifying-a-parameter-in-a-oracle-pdb","status":"publish","type":"post","link":"https:\/\/swiv.com.br\/index.php\/2021\/03\/16\/modifying-a-parameter-in-a-oracle-pdb\/","title":{"rendered":"Modifying a parameter in an Oracle PDB"},"content":{"rendered":"\n<p>Com a mudan\u00e7a de estrutura Multitenant, precisamos nos atentar em rela\u00e7\u00e3o \u00e0 altera\u00e7\u00e3o de par\u00e2metros dentro dos bancos de dados. Talvez o pontap\u00e9 inicial seria checar se o par\u00e2metro em quest\u00e3o n\u00e3o \u00e9 habilitado para modifica\u00e7\u00e3o a n\u00edvel de PDB (non-PDB-modifiable). Para isso, podemos usar a consulta abaixo como exemplo, em rela\u00e7\u00e3o \u00e0 FRA:<\/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 NAME,CDB FROM V$DATABASE;\n \nNAME      CDB\n--------- ---\nTALAMO    YES\n \nSQL&gt; col value format a15\nSQL&gt; SELECT VALUE, ISPDB_MODIFIABLE FROM V$SYSTEM_PARAMETER WHERE NAME=&#039;db_recovery_file_dest_size&#039;;\n \nVALUE           ISPDB\n--------------- -----\n734003200       FALSE\n<\/pre><\/div>\n\n\n<p>A coluna ISPDB com valor FALSE nos indica que uma altera\u00e7\u00e3o s\u00f3 \u00e9 permitada no CBD root. Mesmo assim, fazendo o teste de prova:<\/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; ALTER SESSION SET CONTAINER=HIPOFISE1;\n \nSession altered.\n \nSQL&gt; ALTER SYSTEM SET db_recovery_file_dest_size=2G;\nALTER SYSTEM SET db_recovery_file_dest_size=2G\n*\nERROR at line 1:\nORA-65040: operation not allowed from within a pluggable database\n<\/pre><\/div>\n\n\n<p>Fazendo altera\u00e7\u00e3o 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=\"\">\nSQL&gt; ALTER SESSION SET CONTAINER=CDB$ROOT;\n \nSession altered.\n \nSQL&gt; ALTER SYSTEM SET db_recovery_file_dest_size=1G;\n \nSystem altered.\n \nSQL&gt; SELECT VALUE FROM V$SYSTEM_PARAMETER WHERE NAME=&#039;db_recovery_file_dest_size&#039;;\n \nVALUE\n---------------\n1073741824\n<\/pre><\/div>\n\n\n<p>Realizando o teste em uma par\u00e2metro que pode ser alterado a n\u00edvel de PDB:<\/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; COL VALUE FORMAT A15\nSQL&gt; SELECT VALUE, ISPDB_MODIFIABLE FROM V$SYSTEM_PARAMETER WHERE NAME=&#039;ddl_lock_timeout&#039;;\n \nVALUE           ISPDB\n--------------- -----\n0               TRUE\n<\/pre><\/div>\n\n\n<p>Efetivamente realizando a altera\u00e7\u00e3o:<\/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; ALTER SESSION SET CONTAINER=HIPOFISE1;\n \nSession altered.\n \nSQL&gt; ALTER SYSTEM SET ddl_lock_timeout=20;\n \nSystem altered.\n \nSQL&gt; SHO PARAMETER ddl_lock_timeout;\n \nNAME                                 TYPE        VALUE\n------------------------------------ ----------- ------------------------------\nddl_lock_timeout                     integer     20\n<\/pre><\/div>\n\n\n<p>Observando que o valor do par\u00e2metro \u00e9 o default em um outro PDB:<\/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; ALTER SESSION SET CONTAINER=HIPOFISE2;\n \nSession altered.\n \nSQL&gt; SHOW PARAMETER ddl_lock_timeout\n \nNAME                                 TYPE        VALUE\n------------------------------------ ----------- ------------------------------\nddl_lock_timeout                     integer     0\n<\/pre><\/div>\n\n\n<p>Caso alteremos o par\u00e2metro do CDB root, ser\u00e1 que os PDBs herdam o valor? N\u00e3o. Cada container tem o seu valor independente:<\/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; ALTER SESSION SET CONTAINER=CDB$ROOT;\n \nSession altered.\n \nSQL&gt; SHO PARAMETER ddl_lock_timeout;\n \nNAME                                 TYPE        VALUE\n------------------------------------ ----------- ------------------------------\nddl_lock_timeout                     integer     0\nSQL&gt; ALTER SYSTEM SET ddl_lock_timeout=30;\n \nSystem altered.\n \nSQL&gt; ALTER SESSION SET CONTAINER=HIPOFISE1;\n \nSession altered.\n \nSQL&gt; SHO PARAMETER ddl_lock_timeout\n \nNAME                                 TYPE        VALUE\n------------------------------------ ----------- ------------------------------\nddl_lock_timeout                     integer     20\n<\/pre><\/div>\n\n\n<p>Caso precisemos que todos os containers herdem o mesmo valor, podemos usar o 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=\"\">\nSQL&gt; ALTER SESSION SET CONTAINER=CDB$ROOT;\n \nSession altered.\n \nSQL&gt; ALTER SYSTEM SET ddl_lock_timeout=666 CONTAINER=ALL;\n \nSystem altered.\n \nSQL&gt; ALTER SESSION SET CONTAINER=HIPOFISE1;\n \nSession altered.\n \nSQL&gt; SHO PARAMETER ddl_lock_timeout;\n \nNAME                                 TYPE        VALUE\n------------------------------------ ----------- ------------------------------\nddl_lock_timeout                     integer     666\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>Com a mudan\u00e7a de estrutura Multitenant, precisamos nos atentar em rela\u00e7\u00e3o \u00e0 altera\u00e7\u00e3o de par\u00e2metros dentro dos bancos de dados. Talvez o pontap\u00e9 inicial seria checar se o par\u00e2metro em quest\u00e3o n\u00e3o \u00e9 habilitado para modifica\u00e7\u00e3o a n\u00edvel de PDB (non-PDB-modifiable). Para isso, podemos usar a consulta abaixo como exemplo, em rela\u00e7\u00e3o \u00e0 FRA: A [&hellip;]<\/p>\n","protected":false},"author":1,"featured_media":0,"comment_status":"closed","ping_status":"open","sticky":false,"template":"","format":"standard","meta":{"footnotes":""},"categories":[8],"tags":[],"class_list":["post-2733","post","type-post","status-publish","format-standard","hentry","category-multitenant"],"_links":{"self":[{"href":"https:\/\/swiv.com.br\/index.php\/wp-json\/wp\/v2\/posts\/2733","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=2733"}],"version-history":[{"count":1,"href":"https:\/\/swiv.com.br\/index.php\/wp-json\/wp\/v2\/posts\/2733\/revisions"}],"predecessor-version":[{"id":9228,"href":"https:\/\/swiv.com.br\/index.php\/wp-json\/wp\/v2\/posts\/2733\/revisions\/9228"}],"wp:attachment":[{"href":"https:\/\/swiv.com.br\/index.php\/wp-json\/wp\/v2\/media?parent=2733"}],"wp:term":[{"taxonomy":"category","embeddable":true,"href":"https:\/\/swiv.com.br\/index.php\/wp-json\/wp\/v2\/categories?post=2733"},{"taxonomy":"post_tag","embeddable":true,"href":"https:\/\/swiv.com.br\/index.php\/wp-json\/wp\/v2\/tags?post=2733"}],"curies":[{"name":"wp","href":"https:\/\/api.w.org\/{rel}","templated":true}]}}