Operating System - HP-UX
1752615 Members
4914 Online
108788 Solutions
New Discussion юеВ

Re: Database shutdown problem

 
SOLVED
Go to solution
Brian Crabtree
Honored Contributor
Solution

Re: Database shutdown problem

With a normal TEMPORARY tablespace, you should set the initial and next extent to a reasonable size (for a 4000m tablespace, I would suggest 5m, but this would depend on the number of concurrent sessions accessing your system). You can do this with an alter tablespace command (ie: alter tablespace TEMP default storage (initial 5m next 5m);). I would suggest not setting pctincrease to anything other than 0 for the TEMP tablespace.

With a LM Temporary tablespace (the EXTENT_MANAGEMENT column should say "LOCAL" for this tablespace, 8i and 9i only), you will need to drop and recreate the tablespace. The easiest way is to get the list of files associated with the tablespace (select * From dba_temp_files), perform a drop tablespace, and then a create tablespace with the reuse option. I will build an example:

create temporary tablespace temp tempfile '/mnt/d0001/oradata/temp01.dbf' reuse extent management local uniform size 5m;

That should create the temporary tablespace using your current file (you will need to change the file name most likely).

Hope this answers your question,

Thanks,

Brian
Jeanine Kone
Trusted Contributor

Re: Database shutdown problem

I just wanted to note the distinction between a TEMPORARY tablespace (i.e. create temporary tablespace) and a tablespace designated for temporary sort segments (i.e. create tablespace...temporary).

I have never used the first one - but to respond to the question of it being safe to drop and recreate the tablespace, and as to whether it would contain any user data - the answer may depending upon which type you are talking about.

For the second - their will never be any user objects stored in it (nobody even needs to have quota on it) - so, yes it is safe to drop and recreate.


Brian Crabtree
Honored Contributor

Re: Database shutdown problem

Just to answer your question, neither tablespace will ever contain user objects. Both tablespaces have the "TEMPORARY" flag set, and will disallow non-sort objects from being created in them.

The true temporary tablespace (create temporary tablespace) uses temporary files, rather than datafiles, which can be recreated quickly, and do not require recovery.

Brian