Oracle docs note this about ORA-01658:
ORA-01658: unable to create INITIAL extent for segment in tablespace string
Cause: Failed to find sufficient contiguous space to allocate INITIAL extent for segment being created.
Action: Use ALTER TABLESPACE ADD DATAFILE to add additional space to the tablespace or retry with a smaller value for INITIAL.
The obvious cure for the ORA-01657 error is to:
- Make the INITIAL extent size smaller
- Empty the recycle bin
- Add a datafile the tablespace to provide a larger contiguous chunk size.
- Reorganize the tables in the tablespace
Try this query for your tablespace maximum chunk size tsfree.sql.
This case of ORA-01658 concerns needing to make the tablespace bigger, which can be done by either extending your file, or adding another one. This is a good solution for ORA-01658 because repository tables need to be meticulously created keeping the extents of the table in mind.
This information was taken from ORA-01658: unable to create INITIAL extent tips from the dba-oracle.com website.
Disclaimer:
I am in no way affiliated with the company.
Each tablespace has one or more datafiles that it uses to store data.
The max size of a datafile depends on the block size of the database. I believe that, by default, that leaves with you with a max gb per datafile.
run the following for actual allowed size:
select value from v$parameter where name = 'db_block_size';
Compare the result you get with the first column below, and that will indicate what your max datafile size is.
I have Oracle Personal Edition 11g r2 and in a default install it had an 8,192 block size (32gb per data file).
Block Sz Max Datafile Sz (Gb) Max DB Sz (Tb)
-------- -------------------- --------------
2,048 8,192 524,264
4,096 16,384 1,048,528
8,192 32,768 2,097,056
16,384 65,536 4,194,112
32,768 131,072 8,388,224
You can run this query to find what datafiles you have, what tablespaces they are associated with, and what you've currrently set the max file size to (which cannot exceed the aforementioned 32gb):
select bytes/1024/1024 as mb_size,
maxbytes/1024/1024 as maxsize_set,
x.*
from dba_data_files x
MAXSIZE_SET is the maximum size you've set the datafile to. Also relevant is whether you've set the AUTOEXTEND option to ON (its name does what it implies).
If your datafile has a low max size or autoextend is not on you could simply run:
alter database datafile 'path_to_your_file\that_file.DBF' autoextend on maxsize unlimited;
However if its size is at/near 32gb an autoextend is on, then yes, you do need another datafile for the tablespace:
alter tablespace system add datafile 'path_to_your_datafiles_folder\name_of_df_you_want.dbf' size 10m autoextend on maxsize unlimited;
Also it is generally a good/common practice for you to have a tablespace that is dedicated to indexes (it doesn't seem that you do, because you didn't specify the tablespace in your create index statement, and it is using the default system tablespace), so after creating such a tablespace, you would run something like this (in your case):
CREATE INDEX FTS_INDEX ON FILTERED_TEKLI_IIS_TABLOSU (ilAdi,ilceAdi,caddeAdi)
tablespace name_of_ts_for_indexes
(After creating that tablespace and a datafile for it), via:
create tablespace name_of_ts_for_indexes datafile
'c:\app\xyz\oradata\orcl\name_of_ts_for_indexes01.dbf' autoextend on maxsize unlimited nologging;
That way your tables would be on one table space and the indexes on another.
Thanks to Brian D. for additional Information.
Best Answer
Create the tablespace
or
remap the tablespace to use an existing one, with the
remap_tablespace
parameter:Where
$name2
is the name of an existing tablespace.