0

我正在使用从我正在执行的 SQL 开发人员生成的 SQL 脚本导出一个完整的数据库SQL Developer Versión 17.2.0.188

我正在从

Oracle Database 12c Enterprise Edition Release 12.1.0.1.0 - 64bit ProductionOracle Database 12c Standard Edition Release 12.1.0.2.0 - 64bit Production

我只导出数据库的元数据(数据库对象定义),但是在执行创建此表的脚本时,我在其中一个表中遇到了这个问题:

 CREATE TABLE "PROFILE"."OC_ANDROID" 
   (    "ANDROID_ID" NUMBER(10,0) NOT NULL ENABLE, 
    "NAME" VARCHAR2(60 BYTE) NOT NULL ENABLE, 
    "OC_ANDROID_CATEGORY_ID" NUMBER(10,0) NOT NULL ENABLE, 
    "SNAPPING_CIRCLE" NUMBER(6,0), 
    "SNAPPING_DURATION" NUMBER(6,0), 
    "SNAPPING_METHOD" VARCHAR2(50 BYTE), 
    "GRAPHICAL_SYMBOL" VARCHAR2(2000 BYTE), 
    "WGS84_LATITUDE" NUMBER(10,5), 
    "WGS84_LONGITUDE" NUMBER(10,5), 
    "LOCATION" VARCHAR2(100 BYTE), 
    "POST_CODE" VARCHAR2(50 BYTE), 
    "STREET" VARCHAR2(200 BYTE), 
    "COUNTRY" VARCHAR2(100 BYTE), 
    "STREET_NR" VARCHAR2(10 BYTE), 
    "LM_DATE" DATE, 
    "LM_NAME" VARCHAR2(50 BYTE), 
    "LM_COMMENT" VARCHAR2(2000 BYTE), 
    "GEOFENCE_IN_OC_ALARM_TYPE_ID" NUMBER(10,0), 
    "GEOFENCE_OUT_OC_ALARM_TYPE_ID" NUMBER(10,0), 
    "SHORT_NAME" VARCHAR2(50 BYTE), 
    "CONTACT_FIRST_NAME" VARCHAR2(50 BYTE), 
    "CONTACT_LAST_NAME" VARCHAR2(50 BYTE), 
    "CONTACT_PHONE" VARCHAR2(20 BYTE), 
    "OC_ANDROID_STATUS_ID" NUMBER(10,0), 
    "MAXIMUM_ACTIVITY_DURATION" NUMBER(10,6), 
    "ACTIVITY_OC_ALARM_TYPE_ID" NUMBER(10,0), 
    "GEOM" "MDSYS"."SDO_GEOMETRY" , 
    "ACTIVE_FROM" DATE, 
    "ACTIVE_UNTIL" DATE, 
    "WBS_ID" NUMBER(10,0), 
    "LAST_MOVE_DATE" DATE, 
    "CONTACT_PERSON_ID" NUMBER(10,0), 
    "FLAG_COLOR" VARCHAR2(10 BYTE), 
    "LINE_COLOR" VARCHAR2(10 BYTE), 
    "FILL_COLOR" VARCHAR2(10 BYTE), 
    "FILL_ALPHA" VARCHAR2(10 BYTE), 
    "OLD_OC_ANDROID_CATEGORY_ID" NUMBER(10,0), 
    "OC_ANDROID_HR_REG_ID" NUMBER(10,0), 
    "LAST_SO_TRANSACTION_ID" NUMBER(10,0), 
    "EXEC_SO_TRANSACTION" CHAR(1 BYTE), 
    "IS_COMPANY_PARKING" CHAR(1 BYTE), 
    "GROUP_CAW" VARCHAR2(50 BYTE), 
    "BOUNDARY_MIN_LATITUDE" NUMBER(10,5), 
    "BOUNDARY_MIN_LONGITUDE" NUMBER(10,5), 
    "BOUNDARY_MAX_LATITUDE" NUMBER(10,5), 
    "BOUNDARY_MAX_LONGITUDE" NUMBER(10,5), 
     CONSTRAINT "PK_ANDROID" PRIMARY KEY ("ANDROID_ID")
  USING INDEX PCTFREE 10 INITRANS 2 MAXTRANS 255 COMPUTE STATISTICS 
  STORAGE(INITIAL 524288 NEXT 1048576 MINEXTENTS 1 MAXEXTENTS 2147483645
  PCTINCREASE 0 FREELISTS 1 FREELIST GROUPS 1
  BUFFER_POOL DEFAULT FLASH_CACHE DEFAULT CELL_FLASH_CACHE DEFAULT)
  TABLESPACE "DEVICEDATA"  ENABLE, 
     CONSTRAINT "FK_OC_ANDROID_REF_84754_PERSON" FOREIGN KEY ("CONTACT_PERSON_ID")
      REFERENCES "PROFILE"."PERSON" ("PERSON_ID") ENABLE, 
     CONSTRAINT "FK_OC_ANDROID_REF_69267_WBS" FOREIGN KEY ("WBS_ID")
      REFERENCES "PROFILE"."WBS" ("WBS_ID") ENABLE, 
     CONSTRAINT "FK_OC_ANDROID_REF_ACT_OC_ALARM" FOREIGN KEY ("ACTIVITY_OC_ALARM_TYPE_ID")
      REFERENCES "PROFILE"."OC_ALARM_TYPE" ("OC_ALARM_TYPE_ID") ENABLE, 
     CONSTRAINT "FK_OC_ANDROID_REF_9977_OC_ALARM" FOREIGN KEY ("GEOFENCE_IN_OC_ALARM_TYPE_ID")
      REFERENCES "PROFILE"."OC_ALARM_TYPE" ("OC_ALARM_TYPE_ID") ENABLE, 
     CONSTRAINT "FK_OC_ANDROID_REF_9981_OC_ALARM" FOREIGN KEY ("GEOFENCE_OUT_OC_ALARM_TYPE_ID")
      REFERENCES "PROFILE"."OC_ALARM_TYPE" ("OC_ALARM_TYPE_ID") ENABLE, 
     CONSTRAINT "FK_ANDROID_REF_662_ANDROID_CATE" FOREIGN KEY ("OC_ANDROID_CATEGORY_ID")
      REFERENCES "PROFILE"."OC_ANDROID_CATEGORY" ("OC_ANDROID_CATEGORY_ID") ENABLE, 
     CONSTRAINT "FK_OC_ANDROID_HR_REG" FOREIGN KEY ("OC_ANDROID_HR_REG_ID")
      REFERENCES "PROFILE"."OC_ANDROID_HR_REG" ("OC_ANDROID_HR_REG_ID") ENABLE, 
     CONSTRAINT "FK_OC_ANDROID_REF_31932_OC_ANDROID_S" FOREIGN KEY ("OC_ANDROID_STATUS_ID")
      REFERENCES "PROFILE"."OC_ANDROID_STATUS" ("OC_ANDROID_STATUS_ID") ENABLE
   ) SEGMENT CREATION IMMEDIATE 
  PCTFREE 10 PCTUSED 40 INITRANS 1 MAXTRANS 255 
 NOCOMPRESS LOGGING
  STORAGE(INITIAL 4194304 NEXT 1048576 MINEXTENTS 1 MAXEXTENTS 2147483645
  PCTINCREASE 0 FREELISTS 1 FREELIST GROUPS 1
  BUFFER_POOL DEFAULT FLASH_CACHE DEFAULT CELL_FLASH_CACHE DEFAULT)
  TABLESPACE "DEVICEDATA" 
 VARRAY "GEOM"."SDO_ELEM_INFO" STORE AS SECUREFILE LOB 
  ( TABLESPACE "DEVICEDATA" ENABLE STORAGE IN ROW CHUNK 8192
  CACHE  NOCOMPRESS  KEEP_DUPLICATES 
  STORAGE(INITIAL 106496 NEXT 1048576 MINEXTENTS 1 MAXEXTENTS 2147483645
  PCTINCREASE 0
  BUFFER_POOL DEFAULT FLASH_CACHE DEFAULT CELL_FLASH_CACHE DEFAULT)) 
 VARRAY "GEOM"."SDO_ORDINATES" STORE AS SECUREFILE LOB 
  ( TABLESPACE "DEVICEDATA" ENABLE STORAGE IN ROW CHUNK 8192
  CACHE  NOCOMPRESS  KEEP_DUPLICATES 
  STORAGE(INITIAL 106496 NEXT 1048576 MINEXTENTS 1 MAXEXTENTS 2147483645
  PCTINCREASE 0
  BUFFER_POOL DEFAULT FLASH_CACHE DEFAULT CELL_FLASH_CACHE DEFAULT)) 
  PARALLEL
Informe de error -
ORA-00902: tipo de dato no válido
00902. 00000 -  "invalid datatype"
*Cause:    
*Action:
4

2 回答 2

0

您的表使用空间数据类型:“GEOM”“MDSYS”.“SDO_GEOMETRY”,并且空间是企业版选项,在标准版中不可用。

以下是甲骨文文档的链接:

https://docs.oracle.com/database/121/DBLIC/editions.htm#DBLIC109

于 2017-09-27T08:29:33.433 回答
0

您还可以使用 Oracle 定位器。为此,您必须安装 Oracle 多媒体组件 (ordim)。之后,您就有了 MDSYS 方案和数据库中的所有 SDO 对象。

于 2019-07-05T18:39:42.827 回答