Today I have faced one new problem which I would like to share to you all.
In one of my production database, the temporary tablespace is defined as autoextend on, max size is unlimited. Suddenly I got a mail with below error.
ORA-1652: unable to extend temp segment by 128 in tablespace TEMP
Then I have checked total temporary tablespace usage, i.e 32GB, because I used Smallfile Tablespace (default) which is limited to 32GB Max size. Now I created new temporary tablespace (TEMP01), make it as a default and crosschecked and confirmed all the users the default TEMPORARY TABLESPACE changed to TEMP01. Altered old temporary tablespace(TEMP) availability to OFFLINE.
In non business hours I dropped old TEMP tablespace (TEMP) logically. When I checked in OS level the space not got released.
I thought "Some process has been locked that tempfile at OS level", then I followed below steps to release space from OS level.
1) First I find what process ID has locked that tempfile using '/usr/sbin/lsof' command.
$ /usr/sbin/lsof
Then I have seen so many OS locked files, there I found below tempfile related processes.
Output: oracle 17709 oracle 53u REG 104,9 4047511552 920075 /Oracle/oradata/PRODDB/TEMP01.DBF (deleted)
oracle 17709 oracle 54u REG 104,9 4047511552 920075 /Oracle/oradata/PRODDB/TEMP01.DBF (deleted)
2) Next I checked which background process has been locked that processID, There I found the background process is "JXXX" (Some Job), then I simply killed that session.
$ ps -ef|grep 17709
Output: oracle 17709 1 3 Jan13 ? 3-15:42:12 ora_j000_PRODDB
$ kill -9 17709
Now space got released from OS level.
Hope this will help you... :)
Best Regards,
In one of my production database, the temporary tablespace is defined as autoextend on, max size is unlimited. Suddenly I got a mail with below error.
ORA-1652: unable to extend temp segment by 128 in tablespace TEMP
Then I have checked total temporary tablespace usage, i.e 32GB, because I used Smallfile Tablespace (default) which is limited to 32GB Max size. Now I created new temporary tablespace (TEMP01), make it as a default and crosschecked and confirmed all the users the default TEMPORARY TABLESPACE changed to TEMP01. Altered old temporary tablespace(TEMP) availability to OFFLINE.
In non business hours I dropped old TEMP tablespace (TEMP) logically. When I checked in OS level the space not got released.
I thought "Some process has been locked that tempfile at OS level", then I followed below steps to release space from OS level.
1) First I find what process ID has locked that tempfile using '/usr/sbin/lsof' command.
$ /usr/sbin/lsof
Then I have seen so many OS locked files, there I found below tempfile related processes.
Output: oracle 17709 oracle 53u REG 104,9 4047511552 920075 /Oracle/oradata/PRODDB/TEMP01.DBF (deleted)
oracle 17709 oracle 54u REG 104,9 4047511552 920075 /Oracle/oradata/PRODDB/TEMP01.DBF (deleted)
2) Next I checked which background process has been locked that processID, There I found the background process is "JXXX" (Some Job), then I simply killed that session.
$ ps -ef|grep 17709
Output: oracle 17709 1 3 Jan13 ? 3-15:42:12 ora_j000_PRODDB
$ kill -9 17709
Now space got released from OS level.
Hope this will help you... :)
Best Regards,
The solution for the space release problem at the OS level is highly recommended.
ReplyDeleteTrevel Apps Best The step-by-step approach and clear explanations make it easy for administrators to tackle this greatly.