Server Administration :: How To Resize Temp Tablespace
Jun 30, 2010i got a error temp tablespace cannot be resized. How to Resize Temp Tablespace?
View 10 Repliesi got a error temp tablespace cannot be resized. How to Resize Temp Tablespace?
View 10 RepliesMy system tablespace size is 800mb and it sends an alert saying that it has exceeded 80% of its usage.However its total max size is 30gb.
FYI
Its autoextensible is set to 'YES'.
2 Node RAC database.
File system is ASM
My question here is... is it advicable to resize a system tablespace to some size when autoextensible is set to 'YES'
or genrally can we resize a system tablespace when autoextensible is set to 'No' ?
SQL> col FILE_NAME format a40
SQL> /
FILE_NAME BYTES/1024/1024 AUT MAXBYTES/1024/1024
---------------------------------------- --------------- --- ------------------
+DATA/ge01114/datafile/system.556.2254454 800 YES 30000.9844
We have a database running with Oracle 10.2.0.4 on Solaris 5.10 [SUN SPARC v240] where the assigned TEMP tablespace size looks to be quite huge ( = 8GB!). There are not much SQL queries being run on the database, but what can I do/find/investigate to be sure of how much TEMP space is 'actually' required for the application to run OK?
Note. I have seen the previous DBA's have marked AUTOEXTEND = ON for the TEMP datafiles as well.
Separate query (but linked to TEMP tablespace):
Even if the TEMP datafiles are created with AUTOEXTEND = ON, sometimes I am seeing 'ORA-01652: unable to extend temp segment by 128'.
I am getting error "ORA-1652: unable to extend temp segment by 128 in tablespace" but i can see there is enough free space left in TEMP. I can see we have many active session. how can we drill down to solve this error. Below is the status for all the tablespaces.
Tablespace STA M A Init Total MB Free MB Used MB LrgstMB MaxExt %Fr A
------------ --- - - ---- ------------ ---------- ----------- -------- ------------ --- -
AMINDEX OLN L S 64K 5,120 5,120 0 3,968 2147483645 100
AMOWNER OLN L S 64K 5,120 5,120 0 3,968 2147483645 100
BOB_TS OLN L U 10M 17,240 16,130 1,110 9,740 2147483645 94
DDP_TAB OLN L U 1M 5,120 3,700 1,420 3,507 2147483645 72
[code]....
I am having a very big Temp Tablespace with 4 tempfiles each of 32GB.Usually there is nightly run involving very big tables.
When i got the error ORA-1652:
unable to extend temp segment by 128 in tablespace TEMP
the temp usage was as follows
Tablespace name Total MB UsedMB FreeMB
TEMP 128818 100735 28083
Only 100GB was used and there was about 28GB free space in Temp.But still i was getting the error.Was it becos it was defragmented and was not able to find a contigous segment? Is it applicable for temp tablespace also..
When i try to create a duplicate table from an existing table i get error.
SQL> create table COMP_TEMP as select * from COMPETITIVE;
create table COMP_TEMP as select * from COMPETITIVE
*
ERROR at line 1:
ORA-01652: unable to extend temp segment by 128 in tablespace DATA_01
The table size is 15 gb.
Currently the tablespace has 2GB free space. If i need to increase the size of the tablespace DATA_01,how much space is required.
One of our customer have problem with following sql statement:
SELECT c.table_name, c.column_name
FROM user_tab_columns c, user_tables t
WHERE c.table_name = t.table_name
AND c.data_type IN ('CLOB', 'BLOB');
During execution it takes all the TEMP tablespace size(8GB).
I gather system stats (dbms_stats.gather_dictionary_stats(estimate_percent=>null)) but it doesn't resolve problem.Above sql statement works fine with RULE hint but I want to know what is the reason of problem with temporary tablespace.
I am trying to run on Oracle report via Oracle Application Concurrent job. Concurrent job is completing normal but I don't get anything on print out page. In log file of this request I see message 'MSG-01003: Errors =>ORA-01652: unable to extend temp segment by 128 in tablespace TEMP'. I almost doubled the TEMP tablespace in size but still I am not able to get rid of this error message.
View 1 Replies View RelatedI've been ASM quite a while. I've two diskgroups extdg and nordg which are of external and normal redundancy respectively. Total diskgroup size is 9G, usuable space came down to 3mb when i tried to resize it to itz maximum. the value under usable column shows the same.
FYI... i've totally three disks in nordg, two in one failgroup and one in another.The disk sized equally 3g each.
Quote:
NAME TOTAL_MB FREE_MB USABLE_FILE_MB
------------------------------ ---------- ---------- --------------
EXTDG 2047 1995 1995
NORDG 9201 3073 3
The command i used to resize all disk to their max is Quote:SQL> alter diskgroup nordg resize all size 3067M;
Today i am facing an error when going to rezise the datafile its fixed size is 19000M abut after truncating all tables it is 112M, but when i am going to resize its datafile to 500M its get me an error ora-03297 file contain used data beyond requested size values.
I have done the same before a week without any error.But this time i got the error
The below query throws an error as mention below
My PGA_AGREGATOR_TARGET = 2GB
below query is given below.
RowsPlan
1SELECT STATEMENT
1 HASH JOIN
1 MERGE JOIN CARTESIAN
1 TABLE ACCESS BY INDEX ROWID WAT_SOURCE_DATA
BITMAP CONVERSION TO ROWIDS
BITMAP INDEX SINGLE VALUE INDX_WAT_SRC_DATA_BIT
[code]....
Error Message : ORA-01652:unable to extend temp segment by 128 in tablespace TEMP
Query :
SELECT OR004.wat_id "WAT_ID",
SYSDATE "DATE_FIRST_IDENTIFIED",
SYSDATE "DATE_LAST_IDENTIFIED",
'OR-004' "RULE_REFNO",
'RISK' "RULE_TYPE",
OR004.workspace_id "WORKSPACE_ID",
OR004.workspace_name "WORKSPACE_NAME",
[code]....
this huge report that uses inline views. I keep getting the following error message when running the script through toad. I was thinking about using the USE_HASH hints. The sql optimizer we use is very buggy in Toad. I'm using oracle database version 10.2.0.3.
I can upload explain plan if needed.
SELECT 'Project Number^Project Start Date^Project End Date^Status^Project Manager^Task Number^'||
'Task Start Date^Task Completion Date^Task Manager^Award Number^Award Short Name^Project Organization^'||
'Task Organization^Expense Code^OMB Code^Revenue Line^Burden Rate^Burden Structure^Site^Sponsor^Type^Customer^'||
'Award Type^Award Purpose^Federal Flow Thru Code^IDC Schedule Name^Total Expenditure^Direct Charges^'||
'Indirect Charges^Cost Share Charges^Total Commitments^Direct Commitments^Indirect Commitments^Cost Share Commitments^'||
[Code]...
I have a TEMP tablespace with autoextend on next 10M and maxsize 5120M, now my tablespace is 99.98% full. Am getting ORA-1652: unable to extend temp segment by 128 in tablespace temp error, can i use the method to increase the maxsize value to 10240M.
View 2 Replies View RelatedI have one generic question about space management. I have one table with size of 1TB. This table stored in ORC1 tablespace. This tablespace contains 70 datafiles.
Since it's 10.2.0.4 database. I have dropped this table by using purge
drop table <<table_name>> purge;
Once table drop was completed. When I check the tablespace space it was 100% free but due to HWM was unable to resize the datafile from current size to small size. What was the reason behind this. Is there any process needs to follow when dropping big tables ? like instead of dropping the tables do I need to truncate first & then drop .
One of my friend is facing a problem that while creating the database he has chosen UNDOTBS size as 4 GB and now he wants to resize it.
View 1 Replies View RelatedI am doing an import job and the following error occurs during Index import. is the reason for this error?
View 1 Replies View RelatedI have a "prj_tbl" named tablespace in a user's schema in my database. i have given 100mb size to the "prj_tbl" at the time of its creation and auto extend is open for 10mb,and now this tablespace is using nearly 3.6mb space for its data and remaining space is free,now i want to reduce the size of "prj_tbl" tablespace to 20mb and when i tried to resize it then ,
It throws an error- "'ora-03297 file contains used data beyond requested resize value oracle"
I think this message showing that my new size is small than the size of data on my tablespace but it shows free space nearly 96mb then it means my new size is larger than the size of data on tablespace. How should I reduce the size..
I'm trying to increase the size of my system tablespace. The tablespace contains one datafile size 900MB and it can increase to 2GB.
I'd like to change this to autoextend as I'm going to run csscan on the database.
When I do change the autoextend and unlimited part of the file I get: ORA-03297: file contains used data beyond requested RESIZE value
I've also tried to increase the datafile to 4GB but still the same. I can see that there is more then enough space on the filesystem.
Oracle Enterprise edt 10.2.0.5
i have a tablespace which contains 121 datafile(max limit reached) as a dba what we have to do?
creating a new tablespace with a datafile and assign the users to the current tablespace which i created now.iif the above process is correct,after some time the tablespace which was filled up got freed up.now can i give the access to the users previous (i.e. freed up tablespace) and current tablespaces
My database version is
Oracle Database 11g Enterprise Edition Release 11.1.0.7.0 - 64bit Production
PL/SQL Release 11.1.0.7.0 - Production
CORE 11.1.0.7.0 Production
TNS for Linux: Version 11.1.0.7.0 - Production
NLSRTL Version 11.1.0.7.0 - Production
My os version is
Linux damdat01 2.6.18-128.7.1.el5 #1 SMP Wed
Aug 19 04:00:49 EDT 2009 x86_64 x86_64 x86_64
GNU/Linux
My database is OLP system.
My question is what are the advantages and disadvantages having one single tablespace versus multiple tablespace?
Easy to maintain when you have single tablespace. but hard to track the IO issues if you have one single tablespace.
we have 5 tempfile ( each of 65 gb ) allocated to TEMP tablespace...and still we are running in short of space..when i checked the TEMP segment usage, i am able to see much FREE blocks. how to release those space ?
TABLESPACE_N FILE_ID FILE_NAME Size(MB)
------------ ---------- ------------------------------------------- ----------
TEMP 1 +DATA/tedw/tempfile/temp.3043.727779755 65535.9688
TEMP 2 +DATA/tedw/tempfile/temp.3042.727779749 65535.9688
TEMP 3 +DATA/tedw/tempfile/temp.3041.727779741 65535.9688
TEMP 4 +DATA/tedw/tempfile/temp.4065.730387401 65535.9688
TEMP 5 +DATA/tedw/tempfile/temp.4075.731586241 65535.9688SELECT tablespace_name,
total_blocks,
used_blocks,
free_blocks,
total_blocks*16/1024 as total_MB,
used_blocks*16/1024 as used_MB,
free_blocks*16/1024 as free_MB
FROM v$sort_segment;
TABLESPACE_N TOTAL_BLOCKS USED_BLOCKS FREE_BLOCKS TOTAL_MB USED_MB FREE_MB
------------ ------------ ----------- ----------- ---------- ---------- ----------
TEMP 9994624 1007360 8987264 156166 15740 140426
1 row selected.
further when i checked the session details using TEMP segment, i got below output:
SELECT b.tablespace, b.segfile#, b.segblk#, b.blocks, a.sid, a.serial#,a.username, a.osuser, a.status
FROM v$session a,v$sort_usage b
WHERE a.saddr = b.session_addr
ORDER BY b.tablespace, b.segfile#, b.segblk#, b.blocks;
TABLESPACE SEGFILE# SEGBLK# BLOCKS SID SERIAL# USERNAME OSUSER STATUS
------------------------------- ---------- ---------- ---------- ---------- ---------- ------------------------------ ------------------------------ --------
TEMP 15001 3549184 576 475 1237 EQUIPMENT infa ACTIVE
TEMP 15001 4002368 64 796 4677 CRM infa ACTIVE
TEMP 15002 580608 20352 868 615 EDW infa ACTIVE
TEMP 15002 3962112 832 92 1065 EDWSTG infa ACTIVE
TEMP 15002 4021120 576 1236 7257 EQUIPMENT infa ACTIVE
TEMP 15003 23936 64 819 5586 EDW infa ACTIVE
TEMP 15003 3798400 832 855 1801 EDWSTG infa ACTIVE
TEMP 15004 205056 21632 795 8171 EDW infa ACTIVE
TEMP 15004 4031488 832 403 1299 EDWSTG infa ACTIVE
TEMP 15004 4131456 576 19 6802 EQUIPMENT infa ACTIVE
TEMP 15005 3617856 832 1166 6204 EDWSTG infa ACTIVE
TEMP 15005 3741760 576 862 953 EQUIPMENT infa ACTIVE
TEMP 15005 4042752 18176 1226 5379 CDM infa ACTIVE
3 rows selected.
if i killed the SID - 1226, then those temp blocks ( 18176 blocks ) will be released and can other session use that space further ?
there is one more column - SEGBLK#
explain what is the exact meaning of this column ?
to reclaim the space, should i issue below command -
sql>alter tablespace TEMP coalesce;
There is a readonly user on our reporting server. Developers want to use global temporary tables with this user. I don't want the user to have permissions other than readonly.I can grant the user CREATE TABLE privilege and did not grant quota on any permanent tablespace, therefore user would not be unable to create permanent tables but still should be able to create global temporary tables.
Question is would a user with such permissions still be able to utilize temp tables as part of a scheduled job?
If the temp space left is 0%, i.e. all temp space used up, is it possible to make new DB connection ( can new users still connect to the DB)?
Or re-phrasing the question... How much of temp space (if at all ) is required for a new user to login to DB? Like SORT_AREA_SIZE in PGA. So, as memory sort area is already used ( Temp space is 100% full), can DB make more new connections?
I tried to create an index on a large volume table(approx 9 GB) and I got the below error message:-
ORA-01652: unable to extend temp segment by 128 in tablespace TEMP
The size of our TEMP tablespace is 3GB and currently it is showing as full.
This tablespace is locally managed and we are not running any other operation on this test database at the moment.
We need to delete data from this table based on a column value, so I was planning to create an index on that column.
I saw on the net that one of the proposed solution is :-
alter tablespace TEMP default storage (pctincrease 1);
alter tablespace TEMP default storage (pctincrease 0);
alter tablespace TEMP coalesce;
but it was mentioned that this does not work with Locally Managed Tablespaces.
We are currently using Oracle 9.2.0.7.0 production release installed on Linux platform(Linux 2.6.9-89.0.25.ELsmp #1 SMP i686 i686 i386 GNU/Linux)
I increased the size of TEMP tablespace to 12 GB but the index creation still failed with the same error.
We all know that Temp segments in Temporary tablespace don't deallocate even after the process completes, the extents are only marked for reuse.
After an instance restart, it should de-allocate, or what is the default behavior?
Doesn't SMON de-allocate temporary segments here during instance startup?
If it doesn't de-allocate space then it will run out of space, the next time a huge sort operation takes place.
So my next question is how to estimate the correct space of the temp tablespace in the physical design phase.?
CODECREATE TEMPORARY TABLESPACE temp02
TEMPFILE ' /u01/app/oracle/oradata/ora11gR2/temp02.DBF' SIZE 100M
AUTOEXTEND ON NEXT 2M MAXSIZE 500M
EXTENT MANAGEMENT LOCAL UNIFORM SIZE 1M;
CODESQL> SELECT * from DBA_TEMP_FREE_SPACE;
TABLESPACE_NAME TABLESPACE_SIZE ALLOCATED_SPACE FREE_SPACE
------------------------------ --------------- --------------- ----------
TEMP 30408704 30408704 29360128 – Default for system
TEMP02 104857600 1048576 103809024
SQL> select tablespace_name, file_id, bytes_used, bytes_free from v$temp_space_header;
TABLESPACE_NAME FILE_ID BYTES_USED BYTES_FREE
------------------------------ ---------- ---------- ----------
TEMP 1 30408704 0
TEMP02 2 1048576 103809024
Created a user ‘test’ and assigned TEMP02 as its temporary tablespace.
After running sort (a table containing 20 Million records from User test (session 1)
Sys> SQL> select tablespace_name, file_id, bytes_used, bytes_free from v$temp_space_header;
TABLESPACE_NAME TABLESPACE_SIZE ALLOCATED_SPACE FREE_SPACE
------------------------------ --------------- --------------- ----------
TEMP02 104857600 35651584 69206016
TEMP 30408704 30408704 29360128
After Running sort from User test (session 2) but same table
Sys> SQL> select tablespace_name, file_id, bytes_used, bytes_free from v$temp_space_header;
TABLESPACE_NAME TABLESPACE_SIZE ALLOCATED_SPACE FREE_SPACE
------------------------------ --------------- --------------- ----------
TEMP02 104857600 70254592 34603008
TEMP 30408704 30408704 29360128
Free sort space is reduced and more extents allocated for the sort segment
Sys>
select username, tablespace,contents, segtype, extents, blocks from v$sort_usage;
USERNAME TABLESPACE CONTENTS SEGTYPE EXTENTS BLOCKS
------------------------------ ------------------------------- --------- --------- ---------- ----------
TEST TEMP02 TEMPORARY SORT 33 4224
SQL> select tablespace_name, current_users, total_extents, used_extents, free_extents, added_extents, max_used_size
2 from v$sort_segment;
TABLESPACE_NAME CURRENT_USERS TOTAL_EXTENTS USED_EXTENTS FREE_EXTENTS ADDED_EXTENTS MAX_USED_SIZE
------------------------------- ------------- ------------- ------------ ------------ ------------- -------------
TEMP 0 28 0 28 0 1
TEMP02 1 66 33 33 66 66
After the sort completes;
Sys> SQL> SELECT * from DBA_TEMP_FREE_SPACE;
TABLESPACE_NAME TABLESPACE_SIZE ALLOCATED_SPACE FREE_SPACE
------------------------------ --------------- --------------- ----------
TEMP02 104857600 70254592 103809024
TEMP 30408704 30408704 29360128
Free space shows the Temp02 extents are free for re-use by another process Extents not de-allocated
SQL> select tablespace_name, file_id, bytes_used, bytes_free from v$temp_space_header;
TABLESPACE_NAME FILE_ID BYTES_USED BYTES_FREE
------------------------------ ---------- ---------- ----------
TEMP 1 30408704 0
TEMP02 2 70254592 34603008
Actual space (bytes) free in Temp02
Does it mean that 34603008 is actually free and 103809024 is marked free
select username, tablespace,contents, segtype, extents, blocks from v$sort_usage;
No records
Agreed here
SQL> select tablespace_name, current_users, total_extents, used_extents, free_extents, added_extents, max_used_size from v$sort_segment;
TABLESPACE_NAME CURRENT_USERS TOTAL_EXTENTS USED_EXTENTS FREE_EXTENTS ADDED_EXTENTS MAX_USED_SIZE
------------------------------- ------------- ------------- ------------ ------------ ------------- -------------
TEMP 0 28 0 28 0 1
TEMP02 0 66 0 66 66 66
After a startup of instance;
SQL> SELECT * from DBA_TEMP_FREE_SPACE;
TABLESPACE_NAME TABLESPACE_SIZE ALLOCATED_SPACE FREE_SPACE
------------------------------ --------------- --------------- ----------
TEMP 30408704 30408704 29360128
TEMP02 104857600 70254592 34603008
SQL> select tablespace_name, file_id, bytes_used, bytes_free from v$temp_space_header;
TABLESPACE_NAME FILE_ID BYTES_USED BYTES_FREE
------------------------------ ---------- ---------- ----------
TEMP 1 30408704 0
TEMP02 2 70254592 34603008
Why is the sort segments not de-allocated after instance startup??
most of the time i am seeing temporary tablespace issues like temp tablespace is 100% full.
do we have any procedure to clean up temporary data from tablespaces.
and does it effects to database anything.
share any link
I have one database which is recently upgraded from oracle 8.1.5 to oracle 10.2.0.4.The database is having around 300 tablespace and total size of the database is 1.5 TB.
The database was created in oracle 8i and all the teblespace were DMT(Dictionary Managed Tablespace) .Usually after up gradation all the tablespace are in DMT mode. Now my requirement is to convert all the tablespace into LMT (Locally Managed Tablespace) so that I can AVAIL ALL THE FEATURES OF LMT.
This database is a mission critical database and very less downtime can be allowed.
on my 11.2 DB comes from time to time to situation that the temp tablespace runs full. It longs for only couple of seconds and when the dba notice it, the tablespace is already almost empty. Is it a way somehow to create like a "callback-notifier" that fires f.e. when temp tablespace is for let's say 70% full. That "callback-notifier" will run the sql-statement to look in v$session, v$sort_usage, v$process, v$parameter for the problem sessions.
View 6 Replies View RelatedWe are using a GTT table to store the summarize data and display it on same screen(10g 10.2.0.5). Now we are facing temporary tablespace space issue very frequently as our client do not enable the auto extend on for temp table space. We have analyzed the AWR and came to know that there are 900000 inserts per hour on an average. Client DBA Claims that there are sessions(1or 2) which inserts the data in temporary table continuously for 2-3 days.
According to him one session is running from 28th Aug and problem comes on 2nd Sep and after killing the problematic session the application will work fine. Generally this problems come on weekend. I have discussed with our dev team and as per them there is no session leakage issue.
following is the insert statement:
INSERT INTO DT_CA_STNDALN_DETAILS_TMP (ORG_ID,BA_PRODTYPE_ID,MAX
TENOR,GROSSLIMIT,GROSS_UTILISATION,HAS_MDR,HAS_CLUSTER,SIGN_IN
D,GROSS_AVAILABILITY,COLLATERAL,NET_UTILISATION,DT_CA_STNDALN_DE
TAILS_TMP_VER,DM_LSTUPDDT,NET_AVAILABILITY) VALUES (:1,:2,:3,:4,
:5,:6,:7,:8,:9,:10,:11,:12,sysdate,:13) ;
Allwasy temp tablespace shows 100% full, even though database bounce temp is not cleared again it shows 100% full.Is their to Tune this issue.
View 1 Replies View Related