Network Security Internet Technology Development Database Servers Mobile Phone Android Software Apple Software Computer Software News IT Information

In addition to Weibo, there is also WeChat

Please pay attention

WeChat public account

Shulou

Solution to the problem of exporting empty tables with exp in oracle 11g

2025-01-29 Update From: SLTechnology News&Howtos shulou NAV: SLTechnology News&Howtos > Database >

Share

Shulou(Shulou.com)06/01 Report--

A new feature in ORACLE 11G is that when the table has no data, segment is not allocated to save space.

Alter system set deferred_segment_creation=false

The default value of this parameter is TRUE, and when changed to FALSE, segment is assigned to both empty and non-empty tables.

It should be noted that this value has no effect on the previously imported empty tables and still cannot be exported, but can only have an effect on the newly added tables.

Query empty tables that have been previously created

Select 'alter table' | | table_name | | 'allocate extent;' from user_tables where num_rows=0

Export the query results and execute the exported statement

'ALTER TABLE' | | TABLE_NAME | | 'ALLOCATE EXTENT;''

If there are few tables, you can insert a row in the empty table and then delete it, so that the database table will be assigned segment.

Welcome to subscribe "Shulou Technology Information " to get latest news, interesting things and hot topics in the IT industry, and controls the hottest and latest Internet news, technology news and IT industry trends.

Views: 0

*The comments in the above article only represent the author's personal views and do not represent the views and positions of this website. If you have more insights, please feel free to contribute and share.

Share To

Database

Wechat

© 2024 shulou.com SLNews company. All rights reserved.

12
Report