Borrar una Instancia Multitenant y una Base de Datos Pluggable
Consejo Breve
Si quieres borrar una base de datos pluggable o una instancia multitenant necesitar ejecutar los siguientes comandos:
Borrar una Bases de Datos Pluggable
Primero tienes que cerrar la pluggable database
y luego eliminarla incluyendo los archivos de datos físicos:
[oracle@patoracle ~]$ sqlplus / as sysdba
Connected to:
Oracle Database 19c Enterprise Edition Release 19.0.0.0.0 - Production
Version 19.3.0.0.0
SQL> show pdbs
CON_ID CON_NAME OPEN MODE RESTRICTED
---------- ------------------------------ ---------- ----------
2 PDB$SEED READ ONLY NO
3 TALLER READ WRITE NO
SQL> ALTER PLUGGABLE DATABASE taller CLOSE IMMEDIATE;
Pluggable database altered.
SQL> DROP PLUGGABLE DATABASE taller INCLUDING DATAFILES;
Pluggable database dropped.
SQL> show pdbs
CON_ID CON_NAME OPEN MODE RESTRICTED
---------- ------------------------------ ---------- ----------
2 PDB$SEED READ ONLY NO
Borrar una Instancia Multitenant
Para remover una instancia multitenant necesitas usar dbca
:
[oracle@patoracle ~]$ dbca -silent -deleteDatabase -sourceDB patodb -sysDBAUserName sys -sysDBAPassword ********
[WARNING] [DBT-19202] The Database Configuration Assistant will delete the Oracle instances and datafiles for your database. All information in the database will be destroyed.
Prepare for db operation
32% complete
Connecting to database
35% complete
39% complete
42% complete
45% complete
48% complete
52% complete
65% complete
Updating network configuration files
68% complete
Deleting instance and datafiles
84% complete
100% complete
Database deletion completed.
Look at the log file "/opt/oracle/cfgtoollogs/dbca/patodb/patodb0.log" for further details.
[oracle@patoracle ~]$