ORACLE tablespace Extension Method

Source: Internet
Author: User

Environment: linux system tools: PL/SQL DEVELOPER

Step 1: view the tablespace name and file location: select tablespace_name, file_id, file_name, round (bytes/(1024*1024), 0) total_spacefrom dba_data_filesorder by tablespace_name

Step 2: increase the size of the required tablespace: alter database datafile 'tablespace location' new size for resize, for example: alter database datafile' \ oracle \ oradata \ anita_2008.dbf' resize 4000 m In addition to manually increasing the table space size, you can also increase the table space size by adding data files.Method 1: add the number of data files. alter tablespace name
Add datafile 'new data file addresses' size data file size, for example, alter tablespace ESPS_2008
Add datafile '\ oracle \ oradata \ anita_2010.dbf' size 1000 m Method 2: Set automatic expansion of the tablespace. Alter database datafile 'data File Location'
Autoextend on next automatic expansion maxsize maximum expansion size for example: alter database datafile \ oracle \ oradata \ anita_2008.dbf 'autoextend on next 100 m maxsize 10000 m method 3: Query table space usage: select. tablespace_name,. bytes/1024/1024 "sum MB", (. bytes-b.bytes)/1024/1024 "used MB", B. bytes/1024/1024 "free MB", round (. bytes-b.bytes)/. bytes) * 100,2) "used %" from (select tablespace_name, sum (bytes) bytes from dba_data_files group by tablespace_name) a, (select tablespace_name, sum (bytes) bytes, max (bytes) largest from dba_free_space group by tablespace_name) bwhere. tablespace_name = B. tablespace_nameorder by (. bytes-b.bytes)/. bytes) desc;

 

This article is from the "Search" blog

Related Article

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.