Oracle Temporary Tablespaces
Altering a Temporary Tablespace
You can issue the ALTER
TEMPORARY TABLESPACE statement to perform various temporary tablespace
management tasks, including adding a tempfile to grow a temporary tablespace.
Below is an example showing how you can make the temporary tablespace larger
How to add New temp file
in temp tablespace?
SQL> Alter
tablespace TEMP_NEW
Add Tempfile
'/u01/oracle/VIS/data/temp_new02.dbf'
Size 10m;
Default Temporary Tablespace
Temporary Tablespace Data Dictionary Views
Frequently Using Temp Table Space Query
Find the Temporary tablespace
size:
select
TABLESPACE_NAME,FILE_NAME,BYTES/1024/1024,AUTOEXTENSIBLE,MAXBYTES/1024/1024
from dba_temp_files; |
TOP Consuming queries in table
space
select * from ( select s.sid, s.status, s.sql_hash_value sesshash, u.SQLHASH sorthash, s.username, u.tablespace, sum(u.blocks*p.value/1024/1024)
mbused , sum(u.extents) noexts, nvl(s.module,s.program)
proginfo, floor(last_call_et/3600)||':'|| floor(mod(last_call_et,3600)/60)||':'|| mod(mod(last_call_et,3600),60)
lastcallet from v$sort_usage u, v$session s, v$parameter p where u.session_addr = s.saddr and p.name = 'db_block_size' group by
s.sid,s.status,s.sql_hash_value,u.sqlhash,s.username,u.tablespace, nvl(s.module,s.program), floor(last_call_et/3600)||':'|| floor(mod(last_call_et,3600)/60)||':'|| mod(mod(last_call_et,3600),60) order by 7 desc,3) where rownum < 11; |
Find which sql consuming more temp
col sql_text form a80 set lines 120 select sql_text from gv$sqltext
where hash_value= (select sql_hash_value from
gv$session where sid=&1) order by piece / |
Find the free space of the temp
table space
SQL> select 'FreeSpace ' ||
(free_blocks*8)/1024/1024 ||' GB' from v$sort_segment where tablespace_name
like 'TEMP2%'; |
Oracle Temporary Tablespaces >>>>> Download Now
ReplyDelete>>>>> Download Full
Oracle Temporary Tablespaces >>>>> Download LINK
>>>>> Download Now
Oracle Temporary Tablespaces >>>>> Download Full
>>>>> Download LINK Fc