Basic Oracle tablespace operations

Source: Internet
Author: User

 

1.Queries the current tablespace of a database.

Select tablespace_name, file_name, sum (bytes)/1024/1024 table_size from dba_data_files group by tablespace_name, file_name;

 

2.Create a tablespace

Create tablespace data01 Datafile '/Oracle/oradata/DB/data01.dbf' size 500 m;

 

3.Delete a tablespace

Drop tablespace data01 including contents and datafiles;

 

4.Modify the tablespace size

Alter database datafile '/path/naddate05.dbf' resize 100 m

 

5. add data files

Alter tablespace newccs add datafile '/U03/oradata/newccs/newccs04.dbf' size 4896 m;

 

6. delete data files

SQL>Alter database datafile '/path/naddate05.dbf'Offline drop;

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.