Oracle Learning (i) Table spaces and districts

Source: Internet
Author: User
Tags naming convention

1, Table space: Table space is the logical division of the database, a table space belongs to only one database. Each table space consists of one or more data files.

Data from other logical structures in the tablespace is stored in these data files. After the Oracle installation is complete, multiple tablespaces are created automatically.

The main are:

(1) System tablespace: This tablespace is used to store data in the Oracle system internal tables and data dictionaries, such as table names, column names, user names, and so on.

(2) Undo table Space: The tablespace is the tablespace that stores the undo information. When the user modifies the database table (insert, Update,delete),

Oracle automatically uses the Undo table space to temporarily store the data before the modification. When the modifications are completed and submitted, the system reserves the amount of time to modify the data before it is needed to free up some space in the undo table space.

(3) The Users table space: This space is a table space for the user.

(4) Temporary table space: This table space is for users to use temporarily, such as sorting, summary and other operations.

You can use the OEM (Oracle Enterprise Manager) to manage tablespaces, or you can use commands to manage tablespace space. Using an OEM to manage the table space is very simple, just follow the instructions on the system. The Create Tablespace command creates a read/write table space that can be used later to take the table space offline or online, add data files to it, or make it a read-only tablespace using the ALTER TABLESPACE statement. You can also use the drop TABLESPACE statement to undo Tablespace from the database.

(1) Create the table space with the tablespace command. Users who use this command must have permission to create a tablespace.

Syntax format:

Create tablespace tablespace_name datafile ' path/filename ' [size integer [K | M]] [reuse]  
[autoextend [Off |] on [next integer [K | M]] [maxsize [Unlimited |-integer [K | M]]]  
[minmum extent integer [K | M]]  
[default storage storage_clause]  
[online | offline]  
[logging | nologging]  
[Permanent | temporary]< c7/>[extent Management [Dictionary | local [autoallocate | uniform [size integer [K | M]]]]

Where Tablespace_name is the name of the tablespace that will be created, the name is unique in the database, and the naming must conform to the naming convention.

Path/filename: The location and name of the data file. When the keyword reuse is used, indicates that if the file exists, the file is purged and the file is created, and if the file does not exist, a new file is created.

Off/on: Disables or allows automatic expansion of data files. If off, the automatic expansion is prohibited, and if on is selected, the data file is allowed to be extended automatically

Next: Indicates that when more disk space is needed, the disk space allocated to the data file is in kilobytes or MB.

MaxSize umlimited | Integer[k | M: Specifies the maximum disk space that is allowed to be allocated to the data file, where unlimited represents no restrictions.

Minmum Extent: Specifies the minimum length, which defaults to the operating system and database blocks.

Online: The default setting is to make the table space accessible to authorized users immediately after creating the tablespace.

Offline: Means not available

Logging/nologging: Indicates whether future tables, indexes, and so on need to be log processed, and tacitly believes that the need

Permanent: Specifies that the table space will hold the permanent object, which is the default setting

Temporary: Specifies that tablespace will be used to save temporary objects

Extent Management: Specifies how the disk area of the table space is managed.

Dictionary: Use a dictionary table to manage table spaces, which is the default setting.

Local: Specify native admin table space

Autoallocate: Specifies that the table space is managed by the system and that the user cannot specify the size of the disk area.

Uniform: Uses the size Byte's consolidated disk area to manage the table space. The default size is 1MB.

Related Article

Contact Us

The content source of this page is from Internet, which doesn't represent Alibaba Cloud's opinion; products and services mentioned on that page don't have any relationship with Alibaba Cloud. If the content of the page makes you feel confusing, please write us an email, we will handle the problem within 5 days after receiving your email.

If you find any instances of plagiarism from the community, please send an email to: info-contact@alibabacloud.com and provide relevant evidence. A staff member will contact you within 5 working days.

A Free Trial That Lets You Build Big!

Start building with 50+ products and up to 12 months usage for Elastic Compute Service

  • Sales Support

    1 on 1 presale consultation

  • After-Sales Support

    24/7 Technical Support 6 Free Tickets per Quarter Faster Response

  • Alibaba Cloud offers highly flexible support services tailored to meet your exact needs.