Sulle nuove versioni del DB Oracle è possibile portare le dimensioni di alcuni Datatypes al limite massimo consentito, ad esempio le Tabelle possono avere i campi di tipo VARCHAR2 non più come limite massimo 4000 ma ad esempio 32k.
Per poter effettuare questa modifica però occorre settare il seguente parametro:
MAX_STRING_SIZE=EXTENDED
Di seguito viene indicato come attivare questo incremento di Maximun Size all'interno di un Pluggable DB.
Per incrementare la dimensione massima di una colonna con Datatype VARCHAR2, NVARCHAR2 o un RAW in un Pluggable DB effettuare i seguenti passi:
- Shut down the PDB.
- Reopen the PDB in migrate mode.
Note:
The following SQL statement can be used
to reopen a PDB in migrate mode when the current container is the PDB:
ALTER
PLUGGABLE DATABASE pdb-name OPEN UPGRADE;
- Change the setting of
MAX_STRING_SIZEin the PDB toEXTENDED. - Run the
rdbms/admin/utl32k.sqlscript in the PDB. You must be connectedAS SYSDBAto run theutl32k.sqlscript. - Reopen the PDB in
NORMALmode.
Note:
The utl32k.sql script increases the maximum size
of the VARCHAR2, NVARCHAR2, and RAW columns for the views where this
is required. The script does not increase the maximum size of the VARCHAR2, NVARCHAR2, and RAW columns in some views because of
the way the SQL for those views is written.
- Run the
rdbms/admin/utlrp.sqlscript in the PDB to recompile invalid objects. You must be connectedAS SYSDBAto run the script.
- Oracle Multitenant Administrator's Guide for more information about modifying the open mode of PDBs.
- Increasing the Maximum Size of VARCHAR2, NVARCHAR2, and RAW Columns in a PDB
- https://docs.oracle.com/en/database/oracle/oracle-database/19/refrn/MAX_STRING_SIZE.html#GUID-D424D23B-0933-425F-BC69-9C0E6724693C
- Database Reference
- https://docs.oracle.com/en/database/oracle/oracle-database/19/refrn/MAX_STRING_SIZE.html#GUID-D424D23B-0933-425F-BC69-9C0E6724693C
Nessun commento:
Posta un commento