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

Oracle 12.2 how to use the dbms_redefinition.redef_table procedure to redefine the storage properties of a table

2025-02-24 Update From: SLTechnology News&Howtos shulou NAV: SLTechnology News&Howtos > Database >

Share

Shulou(Shulou.com)05/31 Report--

This article mainly shows you "Oracle 12.2 how to use the dbms_redefinition.redef_table process to redefine the storage properties of the table", the content is easy to understand, well-organized, hope to help you solve your doubts, the following let the editor lead you to study and learn "Oracle 12.2 how to use the dbms_redefinition.redef_table process to redefine the storage properties of the table" this article.

Oracle 12.2 uses the dbms_redefinition.redef_table procedure to redefine the storage properties of the table. The following example describes the use of the redef_table procedure to redefine the storage properties of the table online. The original table name is test and is stored in the pm schema:

SQL > desc pm.testName Type Nullable Default Comments--AD_ID NUMBER (6) YAD_TEXT CLOB Y

The LOB data type column ad_text in table test uses BasicFile LOB storage and executes the following statement to create the index test_idx

SQL > create index pm.test_idx on pm.test (ad_id) tablespace users;Index created

Table test will be redefined online according to the following rules:

. Tables are compressed using advanced row compression

. The storage tablespace of the table changed from users to example

. Index compression uses the compress 1 option

. The storage table space of the index has also changed from users to example.

. The LOB type column ad_text in the table is compressed using the compress high option

The storage space of the .lob type column ad_text is changed from users to example

.lob type column ad_text becomes SecureFiles LOB storage

The online redefinition operation is as follows:

1. Log in to the database with the user to perform the online redefinition operation

SQL > conn pm/pm@jypdbConnected.

two。 Execute the dbms_redefinition.redef_table process

SQL > exec dbms_redefinition.redef_table (uname = > 'PM',tname = >' TEST',table_compression_type = > 'ROW STORE COMPRESS ADVANCED',table_part_tablespace = >' EXAMPLE',index_key_compression_type = > 'COMPRESS 1 indexation table space = >' EXAMPLE',lob_compression_type = > 'COMPRESS HIGH',lob_tablespace = >' EXAMPLE',lob_store_as = > 'SECUREFILE'); PL/SQL procedure successfully completed.

3. View the redefinition result

This is all of the article "how to use the dbms_redefinition.redef_table procedure to redefine the storage properties of a table in Oracle 12.2". Thank you for reading! I believe we all have a certain understanding, hope to share the content to help you, if you want to learn more knowledge, welcome to follow the industry information channel!

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

Wechat

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

12
Report