{"id":3845,"date":"2021-04-15T08:53:03","date_gmt":"2021-04-15T08:53:03","guid":{"rendered":"https:\/\/swiv.com.br\/using-pdb-lockdown-profile-to-disable-a-database-option\/"},"modified":"2026-05-27T20:02:33","modified_gmt":"2026-05-27T19:02:33","slug":"using-pdb-lockdown-profile-to-disable-a-database-option","status":"publish","type":"post","link":"https:\/\/swiv.com.br\/index.php\/2021\/04\/15\/using-pdb-lockdown-profile-to-disable-a-database-option\/","title":{"rendered":"Using PDB Lockdown Profile to disable a database option"},"content":{"rendered":"\n<p>Lockdown Profile \u00e9 um dos recursos que mais gostei na arquitetura Multitenant, que nos permite customizar pol\u00edticas de seguran\u00e7a para um PDB, como quais features, options os comandos podemos permitir ou n\u00e3o a n\u00edvel de PDB. Neste artigo mostraremos um exemplo simples de desabilitar a op\u00e7ao de utiliza\u00e7\u00e3o de uma option dentro do pluggable database.<\/p>\n\n\n\n<p>Criando um lockdown profile dentro do root container:<\/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 admin]$ sqlplus \/ as sysdba\n \nSQL*Plus: Release 18.0.0.0.0 - Production on Thu Apr 15 05:45:17 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 LOCKDOWN PROFILE PROFILE_DO_BRUNO;\n \nLockdown Profile created.\n \nSQL&gt; col profile_name format a30\nSQL&gt; SELECT PROFILE_NAME FROM DBA_LOCKDOWN_PROFILES;\n \nPROFILE_NAME\n------------------------------\nPRIVATE_DBAAS\nPROFILE_DO_BRUNO\nPUBLIC_DBAAS\nSAAS\n<\/pre><\/div>\n\n\n<p>Desabilitando a option de parti\u00e7\u00e3o neste lockdown profile:<\/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 LOCKDOWN PROFILE PROFILE_DO_BRUNO DISABLE OPTION = (&#039;PARTITIONING&#039;);\n \nLockdown Profile altered.\n \nSQL&gt; col rule format a25\nSQL&gt; col clause format a10\nSQL&gt; SELECT PROFILE_NAME, RULE, CLAUSE, STATUS FROM DBA_LOCKDOWN_PROFILES WHERE PROFILE_NAME=&#039;PROFILE_DO_BRUNO&#039;;\n \nPROFILE_NAME                   RULE                      CLAUSE     STATUS\n------------------------------ ------------------------- ---------- -------\nPROFILE_DO_BRUNO               PARTITIONING                         DISABLE\n<\/pre><\/div>\n\n\n<p>Agora podemos vincular o lockdown profile para o PDB que desejamos:<\/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 PDB_LOCKDOWN=PROFILE_DO_BRUNO;\n \nSystem altered.\n<\/pre><\/div>\n\n\n<p>Conectando no PDB em quest\u00e3o e tentando criar uma tabela particionada:<\/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; conn system\/oracle@HIPOFISE1\nConnected.\nSQL&gt; CREATE TABLE BRUNO(RID NUMBER ) PARTITION BY HASH (RID) PARTITIONS 2;\nCREATE TABLE BRUNO(RID NUMBER ) PARTITION BY HASH (RID) PARTITIONS 2\n*\nERROR at line 1:\nORA-00439: feature not enabled: Partitioning\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>Lockdown Profile \u00e9 um dos recursos que mais gostei na arquitetura Multitenant, que nos permite customizar pol\u00edticas de seguran\u00e7a para um PDB, como quais features, options os comandos podemos permitir ou n\u00e3o a n\u00edvel de PDB. Neste artigo mostraremos um exemplo simples de desabilitar a op\u00e7ao de utiliza\u00e7\u00e3o de uma option dentro do pluggable database. [&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-3845","post","type-post","status-publish","format-standard","hentry","category-multitenant"],"_links":{"self":[{"href":"https:\/\/swiv.com.br\/index.php\/wp-json\/wp\/v2\/posts\/3845","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=3845"}],"version-history":[{"count":1,"href":"https:\/\/swiv.com.br\/index.php\/wp-json\/wp\/v2\/posts\/3845\/revisions"}],"predecessor-version":[{"id":9170,"href":"https:\/\/swiv.com.br\/index.php\/wp-json\/wp\/v2\/posts\/3845\/revisions\/9170"}],"wp:attachment":[{"href":"https:\/\/swiv.com.br\/index.php\/wp-json\/wp\/v2\/media?parent=3845"}],"wp:term":[{"taxonomy":"category","embeddable":true,"href":"https:\/\/swiv.com.br\/index.php\/wp-json\/wp\/v2\/categories?post=3845"},{"taxonomy":"post_tag","embeddable":true,"href":"https:\/\/swiv.com.br\/index.php\/wp-json\/wp\/v2\/tags?post=3845"}],"curies":[{"name":"wp","href":"https:\/\/api.w.org\/{rel}","templated":true}]}}