Añadir un tablespace temporal / cambiar el predeterminado
OracleAlmacenamientoComando
-- Create a new temp tablespace:
CREATE TEMPORARY TABLESPACE temp2
TEMPFILE '/u01/oradata/ORCL/temp2_01.dbf'
SIZE 2G AUTOEXTEND ON NEXT 256M MAXSIZE 20G;
-- Change the database default temp:
ALTER DATABASE DEFAULT TEMPORARY TABLESPACE temp2;
-- Add a tempfile to the old temp:
ALTER TABLESPACE temp ADD TEMPFILE '/u01/oradata/ORCL/temp_02.dbf' SIZE 2G;Qué hace
Proporciona espacio temporal para operaciones de sort/hash/tablas temporales globales; puede mover el predeterminado al nuevo tablespace.
Cuándo usarlo
Ante ORA-01652 (unable to extend temp segment), un cuello de botella en temp o para redimensionar temp.
Precaución
Tras cambiar el predeterminado, no haga DROP del temp antiguo de inmediato si está en uso; elimínelo cuando las sesiones lo hayan liberado.