Oracle deferred_segment_creation usage and exp solution, oraclesegment

Source: Internet
Author: User

Oracle deferred_segment_creation usage and exp solution, oraclesegment

SYS @ ORCL> show parameter segment

NAME TYPE VALUE
-----------------------------------------------------------------------------
Deferred_segment_creation boolean TRUE
Rollback_segments string
Transactions_per_rollback_segment integer 5

The deferred_segment_creation parameter, which is only available in 11.2.0.4G,
Create a table, whether to allocate space when no data is inserted. If the value is true, no space is allocated, but not supported by sys users;
Deferred_segment_creation = ture;
1. When a table without data is created under the sys user, space is automatically allocated;
2. In normal users, no space is allocated when a table without data is created;

Check whether space has been allocated by SQL statements;
Select dbms_metadata.get_ddl ('table', 't1') from dual;
-- Set the output format (set long 99999)

Deferred_segment_creation is added to the Oracle database of version 11.2.0.4. The default value is true.

This will cause objects without segment to not be exported during exp.

Solution:

(1) set deferred_segment_creation to false.
This method is only valid for later tables. The previous tables still do not allocate space.

(2) declare to create a Segment immediately when creating a table

Create table table_name segment creation immediate;

(3) For tables that have been created but have no Segment,
You can execute alter table table_name allocate extent to create the allocated space,
Of course, you can also insert a piece of data to create an allocated space;


Oracle 11g does not have deferred_segment_creation

This is a new feature of 11gR2. Is your version 11gR1?

Select version from v $ instance;
 
Oracle Data Import and Export

1. EXP/IMP will ignore the "empty table" operation. If you want to operate the empty table, you can use the EXPDP/IMPDP command. The usage is similar to EXP/IMP, you only need to create a directory before using it!

[Knowledge extension ------------ share and grow together]
ORACLE 11g
A new parameter is added: deferred_segment_creation. The default value is
True. Specifically, if deferred_segment_creation is true, when a new table is created and data is not inserted into it, the table will not be allocated immediately.
Extent, that is, it does not occupy data space. Space is allocated only after data is inserted. This can save a small amount of space! To prevent incomplete export of EXP/IMP tables, set this parameter to "false" by default when using 11g "!

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.