Oracle modify tablespace size

After using Oracle10g to establish a database, some data was imported into the database, and an error occurred when continuing to import data tables into the database the next day:

I checked a lot of information and found that it was the Oracle table space limitation, which made it impossible to continue importing data. If not set when building the database,

The default tablespace size of Oracle is 400M. When the data volume in the database reaches this value, an error will be reported when importing data into the database. The workaround is

Extended tablespace. You can choose to expand the table capacity, such as expanding to 5G, or automatically increase a certain capacity each time when the table space is not enough, such as 200M each time.

The detailed process is listed below:

1. Log in to the database through the sql plus command.

  Enter sqlplus "login user name/password as login type" in the command line to log in. The built-in user name of the system is commonly sys, and the password is the password set during the installation of oracle. Be sure to keep it in mind, if you use the sys account Login, the login type must be sysdba.

2. View the allocation of each table space.

select tablespace_name, sum(bytes) / 1024 / 1024  from dba_data_files  

 group by tablespace_name;  

3. Check the free situation of each table space.

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

4. Change the data table size (10G)

alter database datafile '/ora/oradata/radius/undo.dbf' resize 10240m;

5. Set the automatic growth when the table space is insufficient

5.1 Check whether the table space grows automatically

SELECT FILE_NAME,TABLESPACE_NAME,AUTOEXTENSIBLE FROM dba_data_files;

5.2 Set table space automatic growth

ALTER DATABASE DATAFILE 'c:\SmartDB01.ora' AUTOEXTEND ON;//Turn on automatic growth

ALTER DATABASE DATAFILE 'c:\SmartDB01.ora' AUTOEXTEND ON NEXT 200M ;//Auto increase 200m each time

ALTER DATABASE DATAFILE 'c:\SmartDB01.ora' AUTOEXTEND ON NEXT 200M MAXSIZE 1024M;//Automatic growth of 200m each time, the maximum data table does not exceed 1G

Guess you like

Origin http://43.154.161.224:23101/article/api/json?id=326460185&siteId=291194637