oracle创建表空间详解(Oracle create table space detailed)
oracle创建表空间详解(Oracle create table space detailed)
ORACLE, table space is the basic method of data management, all the user's object should be stored in the table space, that is, users have the right to use space, in order to create users
Object is not allowed to create objects, because it is to create objects, such as tables, indexes, etc., and there is no place to store, Oracle will prompt: there is no storage quota
So before you create objects, you need to allocate storage space first
Allocating storage creates table spaces:
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, SPACE, MANAGEMENT, AUTO
The above statement is divided into the following sections:
First: CREATE TABLESPACE "SAMPLE" creates a tablespace called SAMPLE
Naming the table space follows the naming conventions of the Oracle
There are three types of table spaces that ORACLE can create:
(1) TEMPORARY: temporary tablespace, used for temporary data storage;
The syntax for creating temporary table spaces is as follows:
CREATE TEMPORARY TABLESPACE "SAMPLE""......
(2) UNDO: restore tablespace. Used to store redo log files
The syntax for creating a reduced table space is as follows:
CREATE UNDO TABLESPACE "SAMPLE""......
(3) user tablespace: the most important, but also used to store user data table space
It can be written directly: CREATE TABLESPACE, "SAMPLE""
TEMPORARY and UNDO table spaces are special table spaces managed by ORACLE. They are only used to store system related data
Second: LOGGING
There are two options for NOLOGGING and LOGGING,
When you create table spaces, NOLOGGING: does not create redo logs
LOGGING and NOLOGGING, on the other hand, create redo logs when creating table spaces
The advantage of using NOLOGGING is that you don't need to generate logs when you create it, so that the creation of table space is faster, but you can't recover after logging data, but gene