This post covers quick fix for temp tablespace issue (ORA-1652) which is to add temporary datafile
Extent – An extent is a logical unit of database storage space allocation made up of a number of contiguous data blocks. One or more extents make up segment.
Segment – A segment is a set of extents that contains all the data for a specific logical storage structure within a tablespace.
Temporary Tablespace – contains transient data that persists only for the duration of the session.
Fix for ORA-1652
1. Identify temporary datafile details :
SQL> select file_name , TABLESPACE_NAME from DBA_TEMP_FILES;
2. Check if there is any space available in temporary tablespace (segment)
3. Temporary fix
a) Resize temporary file as
SQL> alter database tempfile '/mnt/PRDdata/trcprd/temp01.dbf' Resize 10G;
Database altered
or
b) Add temp datafile to temporary tablespace as
SQL> ALTER TABLESPACE TEMP ADD TEMPFILE ‘/mnt/PRDdata/trcprd/temp02.dbf’
SIZE 1024M REUSE AUTOEXTEND ON NEXT 50M MAXSIZE 1024M;
Extent – An extent is a logical unit of database storage space allocation made up of a number of contiguous data blocks. One or more extents make up segment.
Segment – A segment is a set of extents that contains all the data for a specific logical storage structure within a tablespace.
Temporary Tablespace – contains transient data that persists only for the duration of the session.
Fix for ORA-1652
1. Identify temporary datafile details :
SQL> select file_name , TABLESPACE_NAME from DBA_TEMP_FILES;
2. Check if there is any space available in temporary tablespace (segment)
SQL> select sum(bytes)/1024
"Size_MB"from dba_temp_files where tablespace_name like 'TEMP';
Size_MB
----------
19548160
3. Temporary fix
a) Resize temporary file as
SQL> alter database tempfile '/mnt/PRDdata/trcprd/temp01.dbf' Resize 10G;
Database altered
or
b) Add temp datafile to temporary tablespace as
SQL> ALTER TABLESPACE TEMP ADD TEMPFILE ‘/mnt/PRDdata/trcprd/temp02.dbf’
SIZE 1024M REUSE AUTOEXTEND ON NEXT 50M MAXSIZE 1024M;
No comments:
Post a Comment