In Oracle, table space is the basic method of data management, all users ' objects should be stored in the table space, that is, the user has the right to use the space, in order to create user
Object Otherwise it is not allowed to create objects, because you want to create objects, such as tables, indexes, and so on, there is no place to store, Oracle will prompt: No storage quotas.
Therefore, before you create an object, you first allocate the storage space.
To allocate storage, you create a tablespace:
Examples of creating table spaces are as follows:
CREATE tablespace "SAMPLE"
LOGGING
DataFile ' D:\ORACLE\ORADATA\ORA92\LUNTAN.ora ' SIZE 5M
EXTENT MANAGEMENT local SEGMENT spaces MANAGEMENT AUTO
The above statements are divided into the following sections:
First: Create Tablespace "Sample" creates a tablespace named "Sample".
To name the table space, follow the Oracle naming conventions.
There are three types of tablespaces that Oracle can create:
(1) Temporary: Temporary table space for the storage of temporary data;
The syntax for creating temporary table spaces is as follows:
CREATE temporary tablespace "SAMPLE" ...
(2) Undo: Restores the table space. Used to save the redo log file.
The syntax for creating a restore table space is as follows:
CREATE UNDO tablespace "SAMPLE" ...
(3) User table space: The most important, but also for the storage of user data table space
Can be written directly: CREATE tablespace "SAMPLE"
The temporary and UNDO table spaces are special table spaces managed by Oracle. Only used to store system-related data.
Second: LOGGING
There are two options for nologging and LOGGING,
Nologging: When creating a tablespace, redo logs are not created.
LOGGING and nologging are just the opposite of generating a redo log when creating a tablespace.
When you use nologging, the advantage is that you do not need to generate a log when creating, so the table space is created faster, but can not log, data loss, can not recover, but generally we
When you create a table space, there is no data, in the usual practice, is to build the table space, and import data to do back up the data, so usually do not need to create a table space
Build the log, so when you create a tablespace, select nologging to speed up the creation of the table space.