I have .sql
包含 60 多个表的 DDL 的脚本文件。我正在尝试将脚本复制粘贴到 SQL Developer 中,连接到数据库“Oracle Database 11g Express Edition Release 11.2.0.2.0 - 64bit Production”。
示例 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.
如果我删除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" ;
这有效。但我无法在每个表脚本中手动删除它。
如果我有.dmp
转储文件,那么以下语法也可以解决问题;在源实例上:
EXPDP user/pwd dumpfile=somename.dmp directory=DATA_DUMP_DIR nologfile=Y version=10.2
并在目标实例上
IMPDP user/pwd dumpfile=somename.dmp directory=DATA_DUMP_DIR nologfile=Y version=10.2
但我没有.dmp
文件,我只有一个.sql
file.
哪种方法最好?