Quick Search:
CODE
Oracle PL/SQL Code Library
JOBS
Find Or Post Oracle Jobs
FORUM
Oracle Discussion & Chat
 Oracle PL/SQL: TABLESPACE: Create temp tablespace Jump to:  
Category: >> Oracle PL/SQL >> TABLESPACE: Create temp tablespace Bookmark and Share

<< lastnext >>

Snippet Name: TABLESPACE: Create temp tablespace

Description: Temporary tablespaces are used to manage space for database sort operations and for storing global temporary tables. For example, if you join two large tables, and Oracle cannot do the sort in memory, space will be allocated in a temporary tablespace for doing the sort operation.

Comment: (none)

Language: PL/SQL
Highlight Mode: PLSQL
Last Modified: March 12th, 2009

CREATE TEMPORARY TABLESPACE tablespace_name
TEMPFILE Tempfile_Options 
[EXTENT MANAGEMENT LOCAL] 
[UNIFORM [SIZE int K | M] ];
 
Tempfile_Options:
    'filespec' [AUTOEXTEND OFF]
    'filespec' [AUTOEXTEND ON [NEXT int K | M] [MAXSIZE int K | M]]
 
-- The Autoextend Maxsize clause will default to UNLIMITED if no 
-- value is specified.
 
-- To create a locally managed tablespace specify 
-- 'EXTENT MANAGEMENT LOCAL'.
 
-- All extents of temporary tablespaces are the same size - if 
-- UNIFORM is not defined it will default to 1 MB (1024K).
 
 
-- In Oracle 9i and above, one can define a Default Temporary 
-- Tablespace at database creation time, or by issuing an 
-- "ALTER DATABASE" statement:
 
ALTER DATABASE DEFAULT TEMPORARY TABLESPACE temp;
 
-- The default Default Temporary Tablespace is SYSTEM. Each 
-- database can be assigned one and only one Default Temporary 
-- Tablespace. Using this feature, a Temporary Tablespace is 
-- automatically assigned to users. The following restrictions 
-- apply to default temporary tablespaces:
 
-- The Default Temporary Tablespace must be of type TEMPORARY
-- The DEFAULT TEMPORARY TABLESPACE cannot be taken off-line
-- The DEFAULT TEMPORARY TABLESPACE cannot be dropped until you 
-- create another one.
 
 


Free
Oracle Magazine
Subscriptions
and Oracle White Papers


SQL University.net courses meet the most demanding needs of the business world for advanced education in a cost-effective manner. SQL University.net courses are available immediately for IT professionals and can be taken without disruption of your workplace schedule or processes.

Compared to traditional travel-based training, SQL University.net saves time and valuable corporate resources, allowing companies to do more with less. That's our mission, and that's what we deliver.

Click here to find out more
 
Home      :      Code Library      :      Sponsors      :      Privacy      :      Terms of Use      :      Contact Us 51 users online    © 2009 psoug.org

PSOUG LOGIN
Username: 
Password: 
Forgot your password?