{"id":3819,"date":"2021-04-15T07:43:18","date_gmt":"2021-04-15T07:43:18","guid":{"rendered":"https:\/\/swiv.com.br\/ora-2800-ora-00600-oracle-multitenant-user-conflit-resolution\/"},"modified":"2026-05-27T20:02:33","modified_gmt":"2026-05-27T19:02:33","slug":"ora-2800-ora-00600-oracle-multitenant-user-conflit-resolution","status":"publish","type":"post","link":"https:\/\/swiv.com.br\/index.php\/2021\/04\/15\/ora-2800-ora-00600-oracle-multitenant-user-conflit-resolution\/","title":{"rendered":"ORA-2800\/ORA-00600: Oracle Multitenant User Conflit Resolution"},"content":{"rendered":"\n<p>Neste artigo vou simular uma situa\u00e7\u00e3o que podemos nos deparar ao clonar um PDB de um CDB para outro, onde o PDB de origem clonado possui um common user que o CDB de destino n\u00e3o possui.<\/p>\n\n\n\n<p>Criando um PDB de teste no CDB de origem:<\/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--------- ---\nSINAPSE   YES\n \nSQL&gt; CREATE PLUGGABLE DATABASE SPFC ADMIN USER BSS IDENTIFIED BY oracle DEFAULT TABLESPACE USERS;\n \nPluggable database created.\n \nSQL&gt; ALTER PLUGGABLE DATABASE SPFC OPEN;\n \nPluggable database altered.\n \nSQL&gt; ALTER PLUGGABLE DATABASE SPFC SAVE STATE;\n \nPluggable database altered.\n \nSQL&gt; SELECT NAME,OPEN_MODE FROM V$PDBS;\n \nNAME\n--------------------------------------------------------------------------------\nOPEN_MODE\n----------\nPDB$SEED\nREAD ONLY\n \nSPFC\nREAD WRITE\n<\/pre><\/div>\n\n\n<p>Criando um Common user no CDB de origem:<\/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; CREATE USER C##LIBERTADORES IDENTIFIED BY oracle CONTAINER=ALL;\n \nUser created.\n \nSQL&gt; GRANT CREATE SESSION TO C##LIBERTADORES CONTAINER=ALL;\n \nGrant succeeded.\n<\/pre><\/div>\n\n\n<p>Adicionei a string de conex\u00e3o do novo PDB no tnsnames.ora:<\/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]$ tnsping SPFC\n \nTNS Ping Utility for Linux: Version 18.0.0.0.0 - Production on 15-APR-2021 04:14:30\n \nCopyright (c) 1997, 2020, Oracle.  All rights reserved.\n \nUsed parameter files:\n\/oracle\/18.0.0\/product\/network\/admin\/sqlnet.ora\n \n \nUsed TNSNAMES adapter to resolve the alias\nAttempting to contact (DESCRIPTION = (ADDRESS = (PROTOCOL = TCP)(HOST = 192.168.0.107)(PORT = 1521)) (CONNECT_DATA = (SERVER = DEDICATED) (SERVICE_NAME = SPFC.localdomain)))\nOK (0 msec)\n<\/pre><\/div>\n\n\n<p>Testando a conex\u00e3o do Common user com o PDB de origem:<\/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 C##LIBERTADORES\/oracle@SPFC\n \nSQL*Plus: Release 18.0.0.0.0 - Production on Thu Apr 15 04:15:35 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; SHOW USER;\nUSER is &quot;C##LIBERTADORES&quot;\n<\/pre><\/div>\n\n\n<p>No CDB de destino, me certifico que n\u00e3o temos nenhum PDB chamado SPFC e nem um common user chamado LIBERTADORES:<\/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 Thu Apr 15 04:16:27 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,cdb from v$database;\n \nNAME      CDB\n--------- ---\nTALAMO    YES\n \nSQL&gt; select name,open_mode from v$pdbs where name like &#039;%SPFC%&#039;;\n \nno rows selected\n \nSQL&gt; select username from cdb_users where username like &#039;%LIBERTADORES%&#039;;\n \nno rows selected\n<\/pre><\/div>\n\n\n<p>Criando DBLINK no CDB de destino apontando para o CDB de origem:<\/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]$ tnsping SINAPSE\n \nTNS Ping Utility for Linux: Version 18.0.0.0.0 - Production on 15-APR-2021 04:24:16\n \nCopyright (c) 1997, 2020, Oracle.  All rights reserved.\n \nUsed parameter files:\n\/oracle\/18.0.0\/product\/network\/admin\/sqlnet.ora\n \n \nUsed TNSNAMES adapter to resolve the alias\nAttempting to contact (DESCRIPTION = (ADDRESS = (PROTOCOL = TCP)(HOST = 192.168.0.107)(PORT = 1521)) (CONNECT_DATA = (SERVER = DEDICATED) (SERVICE_NAME = sinapse.localdomain)))\nOK (0 msec)\n&#x5B;oracle@quiasma admin]$ sqlplus \/ as sysdba\n \nSQL*Plus: Release 18.0.0.0.0 - Production on Thu Apr 15 04:25:16 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 DATABASE LINK DBLINKBSS CONNECT TO system IDENTIFIED BY oracle USING &#039;SINAPSE&#039;;\n \nDatabase link created.\n \nSQL&gt; select * from dual@DBLINKBSS;\n \nD\n-\nX\n<\/pre><\/div>\n\n\n<p>Criando o PDB no destino usando o DB_LINK:<\/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; CREATE PLUGGABLE DATABASE SPFC FROM SPFC@DBLINKBSS;\nCREATE PLUGGABLE DATABASE SPFC FROM SPFC@DBLINKBSS\n*\nERROR at line 1:\nORA-17628: Oracle error 1031 returned by remote Oracle server\nORA-01031: insufficient privileges\n<\/pre><\/div>\n\n\n<p>O erro ocorre pois o usu\u00e1rio utilizado no DBLINK deve possuir privil\u00e9gio de criar PDBs (mesmo sendo o SYSTEM):<\/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 Thu Apr 15 04:27: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; GRANT CREATE PLUGGABLE DATABASE TO SYSTEM CONTAINER=ALL;\n \nGrant succeeded.\n<\/pre><\/div>\n\n\n<p>PDB criado com sucesso:<\/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; CREATE PLUGGABLE DATABASE SPFC FROM SPFC@DBLINKBSS;\n \nPluggable database created.\n \nSQL&gt; ALTER PLUGGABLE DATABASE SPFC OPEN;\n \nPluggable database altered.\n \nSQL&gt; ALTER PLUGGABLE DATABASE SPFC SAVE STATE;\n \nPluggable database altered.\n<\/pre><\/div>\n\n\n<p>Adicionado string de conex\u00e3o do novo PDB no tnsnames.ora:<\/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]$ tnsping SPFC\n \nTNS Ping Utility for Linux: Version 18.0.0.0.0 - Production on 15-APR-2021 04:34:27\n \nCopyright (c) 1997, 2020, Oracle.  All rights reserved.\n \nUsed parameter files:\n\/oracle\/18.0.0\/product\/network\/admin\/sqlnet.ora\n \n \nUsed TNSNAMES adapter to resolve the alias\nAttempting to contact (DESCRIPTION = (ADDRESS_LIST = (ADDRESS = (PROTOCOL = TCP)(HOST = quiasma.localdomain)(PORT = 1521))) (CONNECT_DATA = (SERVER = DEDICATED) (SERVICE_NAME = SPFC.localdomain)))\nOK (0 msec)\n<\/pre><\/div>\n\n\n<p>Logando no PDB com usu\u00e1rio system:<\/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 system\/oracle@SPFC\n \nSQL*Plus: Release 18.0.0.0.0 - Production on Thu Apr 15 04:35:09 2021\nVersion 18.13.0.0.0\n \nCopyright (c) 1982, 2018, Oracle.  All rights reserved.\n \nLast Successful login time: Thu Apr 15 2021 04:18:14 -03:00\n \nConnected to:\nOracle Database 18c Enterprise Edition Release 18.0.0.0.0 - Production\nVersion 18.13.0.0.0\n \nSQL&gt; SHOW USER;\nUSER is &quot;SYSTEM&quot;\n<\/pre><\/div>\n\n\n<p>Tentando logar no PDB com o common user. Pior do que o erro que esper\u00e1vamos (ORA-2800), nos foi reportado um ORA-600:<\/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 C##LIBERTADORES\/oracle@SPFC;\nERROR:\nORA-00600: internal error code, arguments: &#x5B;kziaVrfyAcctStatInRootCbk: !user],\n&#x5B;C##LIBERTADORES], &#x5B;], &#x5B;], &#x5B;], &#x5B;], &#x5B;], &#x5B;], &#x5B;], &#x5B;], &#x5B;], &#x5B;]\n \n \nWarning: You are no longer connected to ORACLE.\n<\/pre><\/div>\n\n\n<p>No alert log:<\/p>\n\n\n<div class=\"wp-block-syntaxhighlighter-code \\&quot;wp-block-syntaxhighlighter-code\\&quot;\"><pre class=\"brush: plain; title: ; notranslate\" title=\"\">\n2021-04-15 04:35:57.196000 -03:00\nErrors in file \/oracle\/18.0.0\/base\/diag\/rdbms\/talamo\/TALAMO\/trace\/TALAMO_ora_3734.trc  (incident=67475) (PDBNAME=CDB$ROOT):\nORA-00600: internal error code, arguments: &#x5B;kziaVrfyAcctStatInRootCbk: !user], &#x5B;C##LIBERTADORES], &#x5B;], &#x5B;], &#x5B;], &#x5B;], &#x5B;], &#x5B;], &#x5B;], &#x5B;], &#x5B;], &#x5B;]\nIncident details in: \/oracle\/18.0.0\/base\/diag\/rdbms\/talamo\/TALAMO\/incident\/incdir_67475\/TALAMO_ora_3734_i67475.trc\n2021-04-15 04:35:58.750000 -03:00\nUse ADRCI or Support Workbench to package the incident.\nSee Note 411.1 at My Oracle Support for error and packaging details.\nDumping diagnostic data in directory=&#x5B;cdmp_20210415043558], requested by (instance=1, osid=3734), summary=&#x5B;incident=67475].\n2021-04-15 04:36:57.053000 -03:00\n<\/pre><\/div>\n\n\n<p>Para tentarmos resolver, vou baixar o 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 PLUGGABLE DATABASE SPFC CLOSE IMMEDIATE;\n \nPluggable database altered.\n<\/pre><\/div>\n\n\n<p>Criando o common user no CDB de destino:<\/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; CREATE USER C##LIBERTADORES IDENTIFIED BY oracle CONTAINER=ALL;\n \nUser created.\n \nSQL&gt; GRANT CREATE SESSION TO C##LIBERTADORES CONTAINER=ALL;\n \nGrant succeeded.\n<\/pre><\/div>\n\n\n<p>Abrindo o PDB e tentando novamente a conex\u00e3o com o common user:<\/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 PLUGGABLE DATABASE SPFC OPEN;\n \nPluggable database altered.\n \nSQL&gt; CONN C##LIBERTADORES\/oracle@SPFC;\nConnected.\nSQL&gt; SHOW USER;\nUSER is &quot;C##LIBERTADORES&quot;\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>Neste artigo vou simular uma situa\u00e7\u00e3o que podemos nos deparar ao clonar um PDB de um CDB para outro, onde o PDB de origem clonado possui um common user que o CDB de destino n\u00e3o possui. Criando um PDB de teste no CDB de origem: Criando um Common user no CDB de origem: Adicionei 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-3819","post","type-post","status-publish","format-standard","hentry","category-multitenant"],"_links":{"self":[{"href":"https:\/\/swiv.com.br\/index.php\/wp-json\/wp\/v2\/posts\/3819","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=3819"}],"version-history":[{"count":1,"href":"https:\/\/swiv.com.br\/index.php\/wp-json\/wp\/v2\/posts\/3819\/revisions"}],"predecessor-version":[{"id":9171,"href":"https:\/\/swiv.com.br\/index.php\/wp-json\/wp\/v2\/posts\/3819\/revisions\/9171"}],"wp:attachment":[{"href":"https:\/\/swiv.com.br\/index.php\/wp-json\/wp\/v2\/media?parent=3819"}],"wp:term":[{"taxonomy":"category","embeddable":true,"href":"https:\/\/swiv.com.br\/index.php\/wp-json\/wp\/v2\/categories?post=3819"},{"taxonomy":"post_tag","embeddable":true,"href":"https:\/\/swiv.com.br\/index.php\/wp-json\/wp\/v2\/tags?post=3819"}],"curies":[{"name":"wp","href":"https:\/\/api.w.org\/{rel}","templated":true}]}}