Reporting ORA-01658 when importing data to the orale Database: failed to create INITIAL partition error for segments in tablespace XXX.
When I create a tablespace in Oracle, the initial size is 200 MB. When the data volume in the database reaches this value, an error is returned when I import data to the database.
The solution is to expand the tablespace.
You can expand the table capacity, for example, to 2 GB, or automatically increase the table capacity every time when the tablespace is insufficient, for example, auto-increment by 200 MB.
View the distribution of each tablespace
?
| 1 |
Select tablespace_name, bytes/1024/1024 from dba_data_files order by bytes; |
View the idle status of each tablespace
?
| 1 |
Select tablespace_name, sum (bytes)/1024/1024 from dba_free_space group by tablespace_name; |
Change the tablespace size (2 GB)
?
| 1 |
Alter database datafile 'd: \ ORACLE \ PRODUCT \ 10.2.0 \ ORADATA \ ORCL \ xxx. dbf' resize 2048 m; |
Automatic growth when the tablespace is set to insufficient
1. Check whether automatic growth is enabled for the tablespace.
?
| 1 |
SELECT FILE_NAME, TABLESPACE_NAME, autoextensible from dba_data_files; |
2. Set automatic growth of tablespaces
?
| 1 2 3 4 |
Alter database datafile 'xxx \ xxx. dbf 'autoextend ON; // Enable Automatic growth of alter database datafile 'xxx \ xxx. dbf 'autoextend on next 200 M; // the value increases automatically by 200 m at a time. // the value increases automatically by 200 m at a time, and the maximum value of the tablespace cannot exceed 1g alter database datafile 'xxx \ xxx. dbf 'autoextend on next 200 m maxsize 1024 M; |