Oracle database table space is insufficient to expand the method example demonstration, the remaining size of the table space is checked, the table space is expanded by adding the table space file, the table space file path is checked

Chapter 1: Expansion of Table Space

① View the size of the remaining table space

Query the remaining table space (unit: M), less than 1M will not be displayed.

select tablespace_name, sum(bytes) / 1024 / 1024  from dba_free_space group by tablespace_name;

It was all 0 at the beginning , and now I added 500M .
Insert picture description here

② View the table space file path

View the table space file path.

select name from v$datafile;

The table space file ending in 23 was created by myself.
Insert picture description here

③ Expand table space by adding table space files

Expand the table space method, you can see the table space file NCC_DATA01_1-23 together form the table space NCC_DATA01 , so we directly add a new serial number table space file on the basis of the storage table space path.
The following setting is the default size of 500M . When the remaining controls are insufficient in the future, it will automatically increase by 200M each time .

alter tablespace NNC_DATA01

add datafile 'D:\ORALCE_HOME\ORADATA\NNC_DATA01_23.DBF'

size 500M

autoextend

on next 200M

maxsize unlimited;

④ View the allocated size of the table space

View table space and allocated size (unit: M)

select tablespace_name, sum(bytes) / 1024 / 1024  from dba_data_files group by tablespace_name;

Insert picture description here
Like it if you like it ❤!

Guess you like

Origin blog.csdn.net/qq_38161040/article/details/108147153