Forum OpenACS Q&A: ORA-01658: unable to create INITIAL extent

Just for posterity, if you are adding a table:
SQL> create table foo (
  2  bar number
  3  );
create table foo (
*
ERROR at line 1:
ORA-01658: unable to create INITIAL extent for segment in 
tablespace BLAH

[nsadmin@nowhere sql]$ oerr ora 01658
01658, 00000, "unable to create INITIAL extent for segment in 
tablespace %s"
// *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
It looks like the best solution is to add in another datafile, as it suggests here. Here's what I eventually did. I'm not sure that it was correct, or even a good idea, but it seems to work:
[nsadmin@nowhere sql]$ svrmgrl

Oracle Server Manager Release 3.1.6.0.0 - Production

Copyright (c) 1997, 1999, Oracle Corporation.  All Rights 
Reserved.

Oracle8i Release 8.1.6.1.0 - Production
JServer Release 8.1.6.0.0 - Production

SVRMGR> connect internal
Connected.

SVRMGR> alter tablespace BLAH add datafile '/ora8/m02/
oradata/ora8/filename02.dbf' size
     2> 50m autoextend on next 5m;
Statement processed.

This seemed to work.
Collapse
Posted by C. R. Oldham on
If you have access to MetaLink, check out Note:33290.1.
Collapse
Posted by Daryl Biberdorf on
You could also increase the size of the existing datafile ALTER DATABASE DATAFILE 'file01.dbf' RESIZE newsize;. Or turn AUTOEXTEND ON for the data file.