PDB com status RESTRICTED

O Oracle Multitenant já está presente em nossas vidas há algum tempo, esta arquitetura nos ajuda a consolidar vários bancos de dados como PDBs em um CDB container.

Arquitetura Multitenant:

Hoje fui acionado para verificar o porquê que o PDB HML não estava acessível, abaixo segue a análise:

O status do pdb HML estava com RESTRICTED YES:

SYS@srv01 AS SYSDBA> show pdbs

    CON_ID CON_NAME                       OPEN MODE  RESTRICTED
---------- ------------------------------ ---------- ----------
         2 PDB$SEED                       READ ONLY  NO
         3 HML_1                   		    READ WRITE NO
         4 HML_2                          READ WRITE NO
         5 HML_3                          READ WRITE NO
         6 HML_4                          READ WRITE NO
         7 HML_5                          READ WRITE NO
         8 HML_6                          READ WRITE NO
         9 HML_7                          MOUNTED
        10 HML_8                          MOUNTED
        13 HML                            READ WRITE YES <=======================

Ao conectar no PDB HML, verifiquei as informações na pdb_plug_in_violations em busca de alguma violação:

SYS@srv01 AS SYSDBA> alter session set container=HML;
show con_name

set lines 300
col status for a10
col type for a10
col cause for a20
col message for a90
SELECT TIME,status, type, cause, message FROM pdb_plug_in_violations order by TIME desc;

TIME                            STATUS     TYPE       CAUSE                MESSAGE
------------------------------- ---------- -------------------- ------------------------------------------------------------------------------------------
25-JUL-23 09.05.00.578492 AM    PENDING    ERROR      SQL Patch         '19.19.0.0.0 Release_Update 2303220204' is installed in the CDB but '19.13.0.0.0 Release_Update 2110041650' is installed in the PDB
07-JUL-23 12.01.43.157242 PM    RESOLVED   WARNING    PDB not Unicode    Character set mismatch: PDB character set WE8ISO8859P15. CDB character set AL32UTF8.

A execução do select acima, ficou evidente que a release instalada no CDB (19.19.0.0.0 Release_Update 2303220204) é mais recente que a release do PDB (19.13.0.0.0 Release_Update 2110041650).

Para corrigir este problema, foi aplicado o datapatch no PDB HML:

[oracle@srv01]# cd $ORACLE_HOME/OPatch
./datapatch -verbose -prereq -pdbs HML
./datapatch -verbose -pdbs HML

Após executar o datapatch, reabrimos o PDB HML:

SQL> alter pluggable database HML close;

Pluggable database altered.

SQL> alter pluggable database HML open;

Pluggable database altered.

SQL> alter pluggable database HML save state;

Pluggable database altered.

Ao verificar o status, ficou constatado que o PDB está disponível para uso sem erros:

SYS@srv01 AS SYSDBA> show pdbs

    CON_ID CON_NAME                       OPEN MODE  RESTRICTED
---------- ------------------------------ ---------- ----------
         2 PDB$SEED                       READ ONLY  NO
         3 HML_1                   		    READ WRITE NO
         4 HML_2                          READ WRITE NO
         5 HML_3                          READ WRITE NO
         6 HML_4                          READ WRITE NO
         7 HML_5                          READ WRITE NO
         8 HML_6                          READ WRITE NO
         9 HML_7                          MOUNTED
        10 HML_8                          MOUNTED
        13 HML                            READ WRITE NO <=======================
search previous next tag category expand menu location phone mail time cart zoom edit close