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

<< lastnext >>

Snippet Name: TABLESPACE: permanent tablespace

Description: Example of creating permanent tablespace on a file system without auto-extend.

Also see:
» TABLESPACE: Show contiguous space
» TABLESPACE: SYSAUX tablespace
» TABLESPACE: Tablespace management
» TABLESPACE: List tablespaces, files, ...
» TABLESPACE: Dropping Tablespaces
» TABLESPACE: Alter Permanent Tablespace
» TABLESPACE: Transportable tablespaces
» TABLESPACE: Tempfile operations
» TABLESPACE: Create temp tablespace
» TABLESPACE: Change UNDO tablespace
» TABLESPACE: Undo Tablespace
» TABLESPACE: SYSAUX Tablespace
» TABLESPACE: Set default tablespace type
» TABLESPACE: Oracle Managed Auto-extend...
» TABLESPACE: Permanent Tablespace Using...
» TABLESPACE: Using Raw Devices

Comment: (none)

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

-- syntax: 
CREATE [<BIGFILE | SMALLFILE>] TABLESPACE <tablespace_name>
DATAFILE '<path_and_file_name>'
SIZE <integer><K | M | G | T | P | E> [REUSE] AUTOEXTEND <OFF | ON>
BLOCKSIZE <bytes>
[<LOGGING | NOLOGGING | FILESYSTEM_LIKE_LOGGING>]
[FORCE LOGGING]
[ENCRYPTION USING '<encryption_algorithm>' 
 IDENTIFIED BY <password> [NO] SALT]
[DEFAULT <COMPRESS [FOR <ALL | DIRECT_LOAD> OPERATIONS] | NOCOMPRESS>]
[<ONLINE | OFFLINE>]
EXTENT MANAGEMENT LOCAL <AUTOALLOCATE | UNIFORM SIZE <extent_size>>
[SEGMENT SPACE MANAGEMENT <AUTO | MANUAL>]
[FLASHBACK <ON | OFF>];
 
 
-- example:
CREATE TABLESPACE  sales_data DATAFILE
'c:\oracle\test\sales_region_1.dbf' SIZE 100M,
'c:\oracle\test\sales_region_2.dbf' SIZE 200M
AUTOEXTEND OFF
BLOCKSIZE 8192
FORCE LOGGING
EXTENT MANAGEMENT LOCAL UNIFORM SIZE 512K
FLASHBACK ON;
 
DESC dba_tablespaces
 
SET linesize 121
col tablespace_name format a20
 
SELECT tablespace_name, block_size, status, contents, 
          retention, extent_management, allocation_type, 
          plugged_in, segment_space_management
FROM dba_tablespaces;
 
DESC dba_data_files
 
col file_name format a45
 
SELECT file_name, tablespace_name, bytes, blocks, autoextensible, increment_by
FROM dba_data_files;
 
SELECT DBMS_METADATA.get_ddl('TABLESPACE', 'SALES_DATA')
FROM dual;
 
 


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