Get the App
SLTechnology News&Howtos  ›  Database  › 

How to expand tablespaces in oracle database

Shulou Source: shulou.com Published: 2022-05-31 21:02:13 09月28日 Update

Today, I will talk to you about how to expand the tablespace in the oracle database, many people may not know much about it. In order to make you understand better, the editor has summarized the following content for you. I hope you can get something according to this article.

Step 1: view the use of tablespaces:

Select tablespace_name,sum (bytes) / 1024 Universe 1024 from dba_data_files group by tablespace_name

Step 2: check the name of the tablespace and the location of the file:

Select tablespace_name, file_id, file_name,round (bytes/ (1024,1024), 0) total_space from dba_data_files order by tablespace_name

Step 3: increase the required tablespace size

Alter database datafile 'tablespace location' resize new size.

For example: alter database datafile'/ home/oracle/oracle11g/oradata/ora11g/users01.dbf' resize 2000m.

Step 4: set the tablespace to expand automatically:

Alter database datafile'\ oracle\ oradata\ anita_2008.dbf'autoextend on next 100m maxsize 10000m

After reading the above, do you have any further understanding of how to extend the tablespace in the oracle database? If you want to know more knowledge or related content, please follow the industry information channel, thank you for your support.

Tags: Space content data database location name size size situation location document more knowledge article industry information information channel channel enter one support Apple Docker Huawei Linux macOS MariaDB Microsoft MySQL NVidia OPPO Reno Redmi Linux Microsoft NVidia macOS