oracle 未启用延迟段创建功能 (ORA-00439)

声明:本页面是StackOverFlow热门问题的中英对照翻译,遵循CC BY-SA 4.0协议,如果您需要使用它,必须同样遵循CC BY-SA许可,注明原文地址和作者信息,同时你必须将它归于原作者(不是我):StackOverFlow 原文地址: http://stackoverflow.com/questions/37941314/
Warning: these are provided under cc-by-sa 4.0 license. You are free to use/share it, But you must attribute it to the original authors (not me): StackOverFlow

提示:将鼠标放在中文语句上可以显示对应的英文。显示中英文
时间:2020-09-19 03:15:37  来源:igfitidea点击:

Deferred Segment Creation feature not enabled (ORA-00439)

oracleoracle11goracle-xe

提问by MAX

I have .sqlscript 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".

我有.sql60 多个表的带有 DDL 的脚本文件。我正在尝试将脚本复制粘贴到 SQL Developer 中,并连接到“Oracle Database 11g Express Edition Release 11.2.0.2.0 - 64bit Production”数据库。

Sample DDL Script:

示例 DDL 脚本:

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 DEFERREDin the DDL Script:

如果我SEGMENT CREATION DEFERRED在 DDL 脚本中删除:

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 .dmpdump file then the following syntax will also solve the issue; on the source instance:

如果我有.dmp转储文件,那么下面的语法也可以解决这个问题;在源实例上:

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 .dmpfile, I only have a .sqlfile.

但是我没有.dmp文件,我只有一个.sql文件。

Which is the best way of doing this?

这样做的最佳方法是什么?

回答by Alex Poole

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).

您正在使用的Oracle 11g Express Edition (XE) 中不提供延迟段创建选项。它仅在企业版 (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 DEFERREDclause.

如果您不想进行导出/导入并且只能使用您已有的提供的脚本文件,您唯一的选择是查找并删除该SEGMENT CREATION DEFERRED子句的所有实例。

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

当然,任何文本编辑都可以做到这一点,SQL Developer在 SQL 工作表窗口中有自己的查找/替换功能

回答by ankit

Just use SEGMENT CREATION IMMEDIATEin place of SEGMENT CREATION DEFERRED

只用SEGMENT CREATION IMMEDIATE代替SEGMENT CREATION DEFERRED