TBS_P2: Changing table space characteristics

Source: Internet
Author: User

Sql>conn system/oracle

-- Create a table space for manual segment management

Sql>altersystem Set db_create_file_dest = '/oradata ';

Sql>createtablespace Tbs_manualsegs segment Space management manual;

-- determine the existence of a new table space

Sql>selecttablespace_name, segment_space_management from Dba_tablespaces

Wheretablespace_name= ' Tbs_manualsegs ';

-- Creating tables and indexes in a table space

Sql>createtable T_mantab (c1 number) tablespace Tbs_manualsegs;

Sql>createindex I_mantab on T_mantab (C1) tablespace manualsegs;

-- new auto Segment table Space

Sql>createtablespace Tbs_autosegs;

-- move an object into a new table space

Sql>altertable t_mantab move tablespace tbs_autosegs;

Sql>alterindex i_mantab rebuild Online tablesapcetbs_autosegs;

-- Delete the original table space

Sql>droptablespace Tbs_manualsegs including contents and datafiles;

-- Rename the new table space to its original name. (Need for application software)

Sql>altertablesapce tbs_autosegs Rename to Tbs_manualsegs;

-- by deleting the tablespace for cleanup, first use the following command

Sql>droptablespace Tbs_manualsegs;

 -- because the tablespace is not empty, an error is raised and should be corrected.

Sql>drop tablespace tbs_manualsegs including contents and datafiles;


This article is from the "struggle more than" blog, please be sure to keep this source http://peenboo.blog.51cto.com/2865551/1790370

Tbs_p2: Changing tablespace properties

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.