Quick Search:
 
 Oracle PL/SQL: TABLESPACE: Create temp tablespace Jump to:  
Category: >> Oracle PL/SQL >> TABLESPACE: Create temp tablespace  

<< 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.
 
 


 
   Home |    Search |    Code Library |    Sponsors |    Privacy |    Terms of Use |    Contact Us © 2003 - 2024 psoug.org