ORA-25153: Temporary Tablespace is Empty

Dopo aver effettuato il restore e recover di un db ho provato a recuperare un package con la seguente query

select dbms_metadata.get_ddl ('PACKAGE','nome_package','nome_Schema') from dual;

ed  è comparso il seguente messaggio di errore:


ORA-25153: Temporary Tablespace is Empty
ORA-06512: at "SYS.DBMS_LOB", line 424
ORA-06512: at "SYS.DBMS_METADATA", line 579
ORA-06512: at "SYS.DBMS_METADATA", line 1260
ORA-06512: at line 1

Questo perché la tablespace TEMP non contiene file come visibile dalla seguente query:

select tb.tablespace_name, tf.file_name 
from dba_tablespaces tb left join dba_temp_files tf on tf.tablespace_name = tb.tablespace_name where tb.contents = 'TEMPORARY';

TABLESPACE_NAME               FILE_NAME                                                                     
------------------------------------------------------------
TEMP                                                         
                                                                             
Occorre creare un file temp01.dbf sul file system e poi eseguire il comando alter tablespace

alter tablespace TEMP 
add tempfile '/u01/app/oracle/oradata/<SID>/temp01.dbf' 
size 4296M
reuse autoextend on next 100M 
maxsize unlimited;


Post popolari in questo blog

Create e Drop Pluggable Database

ORA-12154: TNS: il listener non è attualmente a conoscenza del servizio richiesto nel descrittore di connessione