Bigboss's Blog for Oracle DataBase

My Experiences with Oracle Database

Creating Tablespaces

Posted by thakuranupam on November 8, 2009

The following is the generic form of the command with an explanation of the different components:

CREATE TABLESPACE tablespace_name
[DATAFILE clause]
[MINIMUM EXTENT integer [K]]
[BLOCKSIZE integer [K]]
[LOGGING | NOLOGGING]
[DEFAULT storage_clause]
[ONLINE | OFFLINE]
[PERMANENT | TEMPORARY]

  • tablespace_name – Name of the tablespace to be created
  • DATAFILE – to assign the location of data file associated with the tablespace. AUTOEXTEND is an optional clause to signify the auto extension of data files. REUSE is another optional clause to use an existing data file for the tablespace to be created
  • MINIMUM EXTENT - ensures that every extent used in the tablespace is at least this size and is always a multiple of this size
  • BLOCKSIZE – ensures that each block in the extents allocated is of this size
  • LOGGING – All changes in this tablespace should be written to the online redo log files
  • NOLOGING – Changes in this tablespace should not be written to the online redo log files
  • ONLINE - creates the tablespace online and available for users to start using immediately
  • OFFLINE - makes the tablespace unavailable immediately, and users are not able to use it for storage until the DBA has brought it online
  • PERMANENT - specifies that the tablespace can be used to hold permanent objects
  • TEMPORARY – signifies that the tablespace can be used only to hold temporary data and temporary objects
Advertisement

Leave a Reply

Fill in your details below or click an icon to log in:

WordPress.com Logo

You are commenting using your WordPress.com account. Log Out / Change )

Twitter picture

You are commenting using your Twitter account. Log Out / Change )

Facebook photo

You are commenting using your Facebook account. Log Out / Change )

Connecting to %s

 
Follow

Get every new post delivered to your Inbox.