Deferred Segment Creation feature not enabled (ORA-00439)

偶尔善良 提交于 2019-12-22 08:19:56

问题


I have .sql script file with DDL for more than 60 tables. I am trying to copy-paste the script into SQL Developer, connected to a database which is "Oracle Database 11g Express Edition Release 11.2.0.2.0 - 64bit Production".

Sample DDL Script:

CREATE TABLE UserName."Table_Name" 
   (    "Col1" NUMBER(*,0), 
    "Col2" VARCHAR2(50 BYTE), 
    "Col3" VARCHAR2(50 BYTE)
   ) SEGMENT CREATION DEFERRED 
  PCTFREE 10 PCTUSED 40 INITRANS 1 MAXTRANS 255 NOCOMPRESS LOGGING
  TABLESPACE "USERS" ;

Error report -
SQL Error: ORA-00439: feature not enabled: Deferred Segment Creation
00439. 00000 -  "feature not enabled: %s"
*Cause:    The specified feature is not enabled.
*Action:   Do not attempt to use this feature.

If I remove SEGMENT CREATION DEFERRED in the DDL Script:

CREATE TABLE UserName."Table_Name" 
   (    "Col1" NUMBER(*,0), 
    "Col2" VARCHAR2(50 BYTE), 
    "Col3" VARCHAR2(50 BYTE)
   ) 
  PCTFREE 10 PCTUSED 40 INITRANS 1 MAXTRANS 255 NOCOMPRESS LOGGING
  TABLESPACE "USERS" ;

This works. But I can't manually remove that in each and every table script.

If I have .dmp dump file then the following syntax will also solve the issue; on the source instance:

EXPDP user/pwd dumpfile=somename.dmp directory=DATA_DUMP_DIR nologfile=Y version=10.2

and on the target instance

IMPDP user/pwd dumpfile=somename.dmp directory=DATA_DUMP_DIR nologfile=Y version=10.2

But I don't have a .dmp file, I only have a .sql file.

Which is the best way of doing this?


回答1:


The deferred segment creation option is not available in Oracle 11g Express Edition (XE), which is what you are using. It's only available in Enterprise Edition (EE).

If you don't want to do an export/import and can only use the supplied script file you already have, your only option is to find and remove all instances of the SEGMENT CREATION DEFERRED clause.

Any text edit can do that of course, and SQL Developer has its own find/replace in the SQL Worksheet window.




回答2:


Just use SEGMENT CREATION IMMEDIATE in place of SEGMENT CREATION DEFERRED



来源:https://stackoverflow.com/questions/37941314/deferred-segment-creation-feature-not-enabled-ora-00439

易学教程内所有资源均来自网络或用户发布的内容,如有违反法律规定的内容欢迎反馈
该文章没有解决你所遇到的问题?点击提问,说说你的问题,让更多的人一起探讨吧!