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

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


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 92 users online    © 2009 psoug.org

PSOUG LOGIN
Username: 
Password: 
Forgot your password?