Oracle FAQ Your Portal to the Oracle Knowledge Grid
HOME | ASK QUESTION | ADD INFO | SEARCH | E-MAIL US
 

Home -> Community -> Mailing Lists -> Oracle-L -> RE: Temporary Tablespaces

RE: Temporary Tablespaces

From: Hollis, Les <Les.Hollis_at_ps.net>
Date: Sun, 9 Jan 2005 13:27:09 -0600
Message-ID: <FCC960FDB92F5E469A02464FF72872F40369C710@pscdalpexch50.perotsystems.net>

  1. create default temporary tablespace tspacename

CREATE TEMPORARY TABLESPACE temp
TEMPFILE '/u01/oradata/temp01.dbf' SIZE 500M EXTENT MANAGEMENT LOCAL UNIFORM SIZE 4M; =20 (Set your uniform size to a reasonable size based on your database size. DO NOT use small extents. Use 5m, 10m, even up to 100m if your tspace is large enough If you set it too small, you run in to the iissue of PMON running a long time to clean up the huge number of small extents each time the instance starts.)

After tablespace is created,=20

ALTER DATABASE=20
DEFAULT TEMPORARY TABLESPACE temp;

>From here on, you do not need to specify the temporary tablespace as
part of your create user script, Oracle will set it for you.   Now, =20
Spool change.sql
SQL> select 'alter user '||username||' default tablespace temp;' from dba_users where username not in ('SYS','SYSTEM');

SQL> @change.sql << run your spool file >>

It will alter all of your users to the new tspace name except sys and system....they should remain is system tablespace for their default.

You should now be able to just drop the current temporary tablespace. Of course, it will not drop as long as a user is currently using it...either wait on those users or kill their session...or bounce the DB if you have that luxury, to kick them out. =20

-----Original Message-----
From: Bryan Wells [mailto:bunjibry_at_gmail.com]=20 Sent: Sunday, January 09, 2005 1:12 PM
To: Hollis, Les; Oracle-L
Subject: Re: Temporary Tablespaces

9.2.0.1 on W2K Advanced Server. no they are not set to "default:

On Sun, 9 Jan 2005 13:06:44 -0600, Hollis, Les <Les.Hollis_at_ps.net> wrote:
> What version? Are you using "default" temporary tablespace if on 9i?

--
http://www.freelists.org/webpage/oracle-l
Received on Sun Jan 09 2005 - 13:22:28 CST

Original text of this message

HOME | ASK QUESTION | ADD INFO | SEARCH | E-MAIL US