Home » RDBMS Server » Server Administration » Temp Tablespace not being flushed automatically
Temp Tablespace not being flushed automatically [message #50792] Mon, 08 April 2002 01:02 Go to next message
Hitesh Shenoy
Messages: 11
Registered: January 2002
Junior Member
OS : TrueUnix 5.0
DB : Oracle 8.1.7 on OPS

The temporary tablespace in my database is being filled in continously and does not get flushed out automatically. The view 'gv$sort_segment' shows me 0 free blocks in my Temp tablespace.

So I am forced to restart my database every day, as once the temp gets full my database operations come to a stand still and performance is poor.

Please advise.

Regards,
Hitesh
Re: Temp Tablespace not being flushed automatically [message #50795 is a reply to message #50792] Mon, 08 April 2002 04:57 Go to previous messageGo to next message
Sanjay Bajracharya
Messages: 279
Registered: October 2001
Location: Florida
Senior Member
If your Temp space gets full too quickly, then sounds like it is too small for the type of work you are doing. Or you are not hitting the indexes and in turn doing full table scans. May wanna consider adding some space in the temp tablespace.

As for cleaning up the temp space, here is the command. You do not have to restart the db every time. Just use this command

alter tablespace temp default storage (pctincrease 0);

(as system of coarse).

Good luck.
Re: Temp Tablespace not being flushed automatically [message #50886 is a reply to message #50792] Fri, 12 April 2002 04:55 Go to previous messageGo to next message
Hitesh Shenoy
Messages: 11
Registered: January 2002
Junior Member
Continuing with my issue mentioned above, I have been suggested to create a temporary segment

create temporary tablespace temp01 tempfile 'filename' size 100m;

I have created the 'temp01' segment and the issue has been resolved. Now is it advisable to move my users from the old 'temp' tablespace to the new 'temp01' tablespace. Also can I reduce the size of my old 'temp' and add more new temporary tablespaces. Is there a drawback in doing so?

Also what is the difference between the default 'temp' tablespace which is permanent i beleive and this temporary segment 'temp01'. Cause the new one cant be seen in view dba_tablespaces, the view to check is dba_temp_files and v$tempfile.

Please advise.

Many thanks.

Hitesh
Re: Temp Tablespace not being flushed automatically [message #50894 is a reply to message #50886] Fri, 12 April 2002 11:07 Go to previous messageGo to next message
Kishore
Messages: 45
Registered: September 2000
Member
Hi,
1. There is no drawback in doing so. You can make whatever changes you want to do to the old 'temp' tablespace.

2. The reason you got the problem at the first place is because, it appears that you have allocated a 'permanent tablespace' for sorting purposes.

3. A tablespace with the name 'temp' may not really a 'temporary tablespace' unless you use the keyword 'TEMPORARY' while creating that tablespace.

4. The issue has been resolved this time is because, you have specified TEMPORARY key word in the syntax and therefore created a real 'temporary tablespace'.

5. In addtion, the syntax you have used is specific to the ''LOCALLY MANAGED TEMPORARY TABLESPACES''. Since, it's locally managed you can only find info in v$TEMFILE or dba_temp_files, but not in dictionary managed views like dba_data_files or v$datafile.

I hope this helps you,
Kishore
Re: Temp Tablespace not being flushed automatically [message #59664 is a reply to message #50795] Mon, 15 December 2003 02:50 Go to previous messageGo to next message
patrick
Messages: 83
Registered: December 2000
Member
If Localy managed tablespace (LMT), it's impossible to alter the Storage settings and then to run:

alter tablespace temp default storage (pctincrease 0);

Is there an alternative for LM tablespaces?

Thank you in advance :-)

Patrick.
Re: Temp Tablespace not being flushed automatically [message #59672 is a reply to message #59664] Mon, 15 December 2003 05:30 Go to previous message
Sanjay Bajracharya
Messages: 279
Registered: October 2001
Location: Florida
Senior Member
Patrick,

We were taking about TEMP tablespace and TEMP tablespace are of type TEMPORARY .... In this manner, whenever the DB is recycled, it is cleared out.

But this is really interesting. I did a small test and made TEMP2 'local + temporary' and could not give the 'alter tablespace ...' command.

So I cannot flush the Temp2 .... Please post if you find any alternitives....

Cheers.
--
Sanjay
Previous Topic: Regarding order by
Next Topic: Role of database timezone?
Goto Forum:
  


Current Time: Mon Jan 06 18:40:32 CST 2025