Modify index tablespace in Oracle Database

Source: Internet
Author: User

The Oracle Database modifies the index tablespace, including modifying the table tablespace, modifying the index tablespace, and modifying the tablespace with the CLOB field.
Alter table space syntax

1. Modify the table tablespace.

  1. Alter table TABLENAME move tablespace TABLESPACENAME;
2. Modify the index tablespace.
  1. Alter IndexINDEXNAME rebuild tablespace TABLESPACENAME;
3. Modify the tablespace with the CLOB Field

  1. Alter TableTABLENAMEMoveTablespace TABLESPACENAME lob (COLUMNNAME) storeAs(Tablespace TABLESPACENAME );
Example of modifying a tablespace

Modify Table

  1. Select 'Alter table'| A. table_name |'Move tablespace workflow ;',
  2. A. owner, a. table_name, a. tablespace_name, .*FromDba_tables
  3. WhereA. Owner ='Ermis _ shansi'
  4. Order ByA. owner, a. table_name;
Modify Index

  1. Select 'Alter Index'| A. index_name |'Rebuild tablespace workflow ;',
  2. A. owner, a. index_name, a. tablespace_name, .*FromDba_indexes
  3. WhereA. Owner ='Ermis _ shansi'
  4. Order ByA. owner, a. table_name;
Modify a clob Index

  1. ALTER TABLEWF_H_PROCESSINSTATTRMOVETABLESPACE WORKFLOW
  2. LOB (ATTRIBUTE) STOREAS(Tablespace workflow );
If you encounter a large field, add an attribute:
  1. Select 'Alter Index'| A. index_name |'Rebuild tablespace VASD ;',
  2. A. owner, a. index_name, a. tablespace_name, .*FromDba_indexes
  3. WhereA. Owner ='Ms200bj1'
  4. AndIndex_type ='Normal'
  5. Order ByA. owner, a. table_name;
  6. Select 'Alter Index'| A. index_name |'Rebuild tablespace VASD ;',
  7. A. owner, a. index_name, a. tablespace_name, .*FromDba_indexes
  8. WhereA. Owner ='Ms200bj1'
  9. AndIndex_type ='Lob'
  10. Order ByA. owner, a. table_name;
First, query all tables involving large fields.
  1. SELECT DISTINCTA. table_name
  2. FROMDba_indexes
  3. WHEREA. owner ='Ms200bj1' ANDIndex_type ='Lob'
One by one

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.