Oracle tablespace user Data export ____oracle

Source: Internet
Author: User

Introduction to Oracle Table space
Oracle Tablespace is the basic method of data management, all user's object should be stored in the table space , that is, the user has the right to use space, can 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:

There are three types of tablespaces that Oracle can create:
(1) Temporary: temporary table space for temporary data storage; The syntax for creating temporary table spaces is as follows: Create temporary tablespace test_temp ...
(2) Undo: Restore the table space. Used to save the redo log file. The syntax for creating a restore table space is as follows: Create Undo Tablespace Test_undo ...
(3) User (data) Tablespace: The most important, is also used to store user data table space can be written directly: Create Tablespace test_data ...
The Temporaty and undo table spaces are special table spaces managed by Oracle. For storing system-related data only.

View Tablespace Select Tablespace_name,file_id,bytes,file_name from Dba_data_files

Select Tablespace_name,file_id,bytes,file_name from Dba_data_files



Create (data) tablespace
(Creates a tablespace stu_data,datafile the location of the stored file for the specified datasheet space, the file for storing the data)

--the first kind of Create tablespace stu_data logging datafile ' D:\oracle\product\10.2.0\oradata\orcl\stu_data.dbf ' Size 32m autoextend on next 32m maxsize 2048m extent management local;

--the first kind of
create tablespace stu_data   
logging
datafile ' D:\oracle\product\10.2.0\oradata\orcl\stu_data.dbf '    
size 32m    
autoextend on    
next 32m 
maxsize 2048m    
extent management local; 



To create a table space parameter explanation
1, logging
There are nologging and logging two options, 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 don't have to generate a log when you create this table space to create faster, but can not log, data loss, can not recover, but generally we create a table space, there is no data, according to the usual practice, is to build the table space, and import data, is to do the backup of the data, Therefore, you usually do not need to create a table space log, so when you create a tablespace, select nologging to speed up the creation of the table space.

2, datafile is used to specify the specific location and size of the data file.
For example: DataFile ' D:\Oracle\ORADATA\ORA92\LUNTAN.ora ' size 5M indicates that the location of the file is ' D:\Oracle\ORADATA\ORA92\LUNTAN.ora ' and the file size is 5 m. If you have multiple files, you can separate them with commas:
DataFile ' D:\ORACLE\ORADATA\ORA92\LUNTAN.ora ' size 5M, ' D:\ORACLE\ORADATA\ORA92\dd.ora ' size 5M
However, each file needs to indicate the size. The unit shall prevail in the specified unit, such as 5M or 500K. For specific files, you can store large different media, such as disk arrays, according to different needs, to reduce IO contention. When you specify a filename, you must be an absolute address and you cannot use a relative address.

3. Extent Management Local: storage Management method
Before Oracle 8i, there were two options, one for managing in the Dictionary (dictionary) and the other for local administration (local), starting at 9I and only locally. Because the local management method has many advantages. Manage in the Dictionary (dictionary): make each memory unit in the data file as a record, so when doing DM operation, it will produce a lot of delete and update operation to this management table. Do a lot of data management, will produce a lot of DM operation, strict impact performance, at the same time, the operation of the table data for a long time, will produce a lot of disk fragmentation, which is why to do disk collation reasons. Local administration: Managing disks in a binary way, with high efficiency and maximum use of disk. At the same time, it can automatically track the situation of the adjacent free space and avoid the merging operation of the free zone.

4, Segment Space management: Disk expansion Management method:
Segment Space management: Use this option time zone size is determined automatically by the system. Because Oracle can determine the optimal size of each zone, the zone size is variable.
Uniform Segment Space management: Specify the size of the zone, or use the default value (1 MB).

5, paragraph space management mode:
Auto: Can only be used in a locally managed table space. When you use local to manage an Oracle tablespace, the new state is reflected in the bitmap as the free space in the data block increases or decreases. Bitmaps automate the behavior of Oracle to manage free space and provide better performance for managing free space, but cannot be automatically managed for tables that contain LOB fields.
Nanual: No longer available, mainly for backwards compatibility.

--The second create tablespace stu_data datafile ' D:\oracle\product\10.2.0\oradata\orcl\stu_data.dbf ' size 800M Autoextend on next 50M MaxSize unlimited--maxsize Unlimited is size unrestricted

--The second type of
create tablespace stu_data 
datafile ' D:\oracle\product\10.2.0\oradata\orcl\stu_data.dbf '    
size 800M  
autoextend on  
next 50M  
MaxSize Unlimited  



--The third type of Create tablespace stu_data datafile ' D:\oracle\product\10.2.0\oradata\orcl\stu_data.dbf ' size 800M      Autoextend on next 50M maxsize 1000M extent management The local uniform; The--unform represents the same size and defaults to 1M

--The third type of
create tablespace stu_data 
datafile ' D:\oracle\product\10.2.0\oradata\orcl\stu_data.dbf '    
size 800M  
autoextend on  
next 50M  
maxsize 1000M
Extent management The local uniform;  
The--unform represents the same size and defaults to 1M   



--the fourth kind of create tablespace stu_data datafile ' D:\oracle\product\10.2.0\oradata\orcl\stu_data.dbf ' size 800M      Autoextend on next 50M maxsize 1000M extent management local uniform size 500K; The size of the--unform size 500K indicates that the area is the same as 500K

--the fourth kind of
create tablespace stu_data 
datafile ' D:\oracle\product\10.2.0\oradata\orcl\stu_data.dbf '    
size 800M  
autoextend on  
next 50M 
maxsize 1000M 
Extent management local uniform size 500K;  



--fifth     create tablespace stu_data     datafile  ' d:\ ORACLE\PRODUCT\10.2.0\ORADATA\ORCL\STU_DATA.DBF '         size 800m      autoextend on      next 50m    maxsize 1000m      extent management local autoallocate;     -- The size of the Autoallocate representation area is automatically dynamically changed with the size of the table, and the large table uses the     of the small area to use the cell.

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.