wso2 / product-is

Welcome to the WSO2 Identity Server source code! For info on working with the WSO2 Identity Server repository and contributing code, click the link below.
http://wso2.github.io/
Apache License 2.0
748 stars 728 forks source link

ORA-00922: missing or invalid option occurred when manually sourcing the Oracle sql script #6236

Closed NilukaSripalim closed 5 years ago

NilukaSripalim commented 5 years ago

Enviornment DB - Oracle 12. wso2is-5.9.0-alpha pack

Priority: High Severity: High

Steps: Took the latest oracle script Source that oracle (/wso2is-5.9.0-alpha/dbscripts)

Error starting at line : 32 in command - CREATE TABLE REG_PATH( REG_PATH_ID INTEGER NULL, REG_PATH_VALUE VARCHAR2(2000) NOT NULL, REG_PATH_PARENT_ID INTEGER, REG_TENANT_ID INTEGER DEFAULT 0, CONSTRAINT PK_PATH PRIMARY KEY(REG_PATH_ID, REG_TENANT_ID)), CONSTRAINT UNIQUE_REG_PATH_TENANT_ID UNIQUE (REG_PATH_VALUE,REG_TENANT_ID) Error report - ORA-00922: missing or invalid option

  1. 00000 - "missing or invalid option" Cause:
    Action:

It should be corrected as follows. CREATE TABLE REG_PATH( REG_PATH_ID INTEGER NULL, REG_PATH_VALUE VARCHAR2(2000) NOT NULL, REG_PATH_PARENT_ID INTEGER, REG_TENANT_ID INTEGER DEFAULT 0, CONSTRAINT PK_PATH PRIMARY KEY(REG_PATH_ID, REG_TENANT_ID), CONSTRAINT UNIQUE_REG_PATH_TENANT_ID UNIQUE (REG_PATH_VALUE,REG_TENANT_ID)) /

Because of this ,

Error starting at line : 40 in command - CREATE INDEX REG_PATH_IND_BY_PATH_VALUE ON REG_PATH(REG_PATH_VALUE, REG_TENANT_ID) Error report - ORA-00942: table or view does not exist

  1. 00000 - "table or view does not exist" Cause:
    Action:

Error starting at line : 42 in command - CREATE INDEX REG_PATH_IND_BY_PARENT_ID ON REG_PATH(REG_PATH_PARENT_ID, REG_TENANT_ID) Error report - ORA-00942: table or view does not exist

  1. 00000 - "table or view does not exist" Cause:
    Action:

Error starting at line : 46 in command - CREATE OR REPLACE TRIGGER REG_PATH_TRIGGER BEFORE INSERT ON REG_PATH REFERENCING NEW AS NEW FOR EACH ROW BEGIN SELECT REG_PATH_SEQUENCE.nextval INTO :NEW.REG_PATH_ID FROM dual; END; Error report - ORA-00942: table or view does not exist

  1. 00000 - "table or view does not exist" Cause:
    Action:

Error starting at line : 81 in command - CREATE TABLE REG_RESOURCE ( REG_PATH_ID INTEGER NOT NULL, REG_NAME VARCHAR2(256), REG_VERSION INTEGER, REG_MEDIA_TYPE VARCHAR2(500), REG_CREATOR VARCHAR2(31) NOT NULL, REG_CREATED_TIME TIMESTAMP NOT NULL, REG_LAST_UPDATOR VARCHAR2(31), REG_LAST_UPDATED_TIME TIMESTAMP NOT NULL, REG_DESCRIPTION VARCHAR2(1000), REG_CONTENT_ID INTEGER, REG_TENANT_ID INTEGER DEFAULT 0, REG_UUID VARCHAR2(100) NOT NULL, CONSTRAINT FK_REG_RES_PATH FOREIGN KEY (REG_PATH_ID,REG_TENANT_ID) REFERENCES REG_PATH (REG_PATH_ID,REG_TENANT_ID),
CONSTRAINT PK_REG_RESOURCE PRIMARY KEY(REG_VERSION, REG_TENANT_ID)) Error report - ORA-00942: table or view does not exist

  1. 00000 - "table or view does not exist" Cause:
    Action:

Sequence REG_RESOURCE_SEQUENCE created.

Error starting at line : 99 in command - CREATE OR REPLACE TRIGGER REG_RESOURCE_TRIGGER BEFORE INSERT ON REG_RESOURCE REFERENCING NEW AS NEW FOR EACH ROW BEGIN SELECT REG_RESOURCE_SEQUENCE.nextval INTO :NEW.REG_VERSION FROM dual; END; Error report - ORA-00942: table or view does not exist

  1. 00000 - "table or view does not exist" Cause:
    Action:

Error starting at line : 109 in command - CREATE INDEX REG_RESOURCE_IND_BY_NAME ON REG_RESOURCE(REG_NAME, REG_TENANT_ID) Error report - ORA-00942: table or view does not exist

  1. 00000 - "table or view does not exist" Cause:
    Action:

Error starting at line : 111 in command - CREATE INDEX REG_RESOURCE_IND_BY_PATH_ID ON REG_RESOURCE(REG_PATH_ID, REG_NAME, REG_TENANT_ID) Error report - ORA-00942: table or view does not exist

  1. 00000 - "table or view does not exist" Cause:
    Action:

Error starting at line : 113 in command - CREATE INDEX REG_RESOURCE_IND_BY_UUID ON REG_RESOURCE(REG_UUID) Error report - ORA-00942: table or view does not exist

  1. 00000 - "table or view does not exist" Cause:
    Action:

Error starting at line : 115 in command - CREATE INDEX REG_RESOURCE_IND_BY_TENAN ON REG_RESOURCE(REG_TENANT_ID, REG_UUID) Error report - ORA-00942: table or view does not exist

  1. 00000 - "table or view does not exist" Cause:
    Action:

Error starting at line : 117 in command - CREATE INDEX REG_RESOURCE_IND_BY_TYPE ON REG_RESOURCE(REG_TENANT_ID, REG_MEDIA_TYPE) Error report - ORA-00942: table or view does not exist

  1. 00000 - "table or view does not exist" Cause:
    Action:

Error starting at line : 119 in command - CREATE TABLE REG_RESOURCE_HISTORY ( REG_PATH_ID INTEGER NOT NULL, REG_NAME VARCHAR2(256), REG_VERSION INTEGER NOT NULL, REG_MEDIA_TYPE VARCHAR2(500), REG_CREATOR VARCHAR2(31) NOT NULL, REG_CREATED_TIME TIMESTAMP NOT NULL, REG_LAST_UPDATOR VARCHAR2(31), REG_LAST_UPDATED_TIME TIMESTAMP NOT NULL, REG_DESCRIPTION VARCHAR2(1000), REG_CONTENT_ID INTEGER, REG_DELETED SMALLINT, REG_TENANT_ID INTEGER DEFAULT 0, REG_UUID VARCHAR2(100) NOT NULL, FOREIGN KEY (REG_PATH_ID,REG_TENANT_ID) REFERENCES REG_PATH (REG_PATH_ID,REG_TENANT_ID), FOREIGN KEY (REG_CONTENT_ID,REG_TENANT_ID) REFERENCES REG_CONTENT_HISTORY (REG_CONTENT_ID,REG_TENANT_ID),
CONSTRAINT PK_REG_RESOURCE_HISTORY PRIMARY KEY(REG_VERSION, REG_TENANT_ID)) Error report - ORA-00942: table or view does not exist

  1. 00000 - "table or view does not exist" Cause:
    Action:

Error starting at line : 137 in command - CREATE INDEX REG_RES_HIST_IND_BY_NAME ON REG_RESOURCE_HISTORY(REG_NAME, REG_TENANT_ID) Error report - ORA-00942: table or view does not exist

  1. 00000 - "table or view does not exist" Cause:
    Action:

Error starting at line : 139 in command - CREATE INDEX REG_RES_HIST_IND_BY_PATH_ID ON REG_RESOURCE_HISTORY(REG_PATH_ID, REG_NAME, REG_TENANT_ID) Error report - ORA-00942: table or view does not exist

  1. 00000 - "table or view does not exist" Cause:
    Action:

Error starting at line : 161 in command - CREATE TABLE REG_RESOURCE_COMMENT ( REG_COMMENT_ID INTEGER NOT NULL, REG_VERSION INTEGER, REG_PATH_ID INTEGER, REG_RESOURCE_NAME VARCHAR2(256), FOREIGN KEY (REG_PATH_ID,REG_TENANT_ID) REFERENCES REG_PATH (REG_PATH_ID,REG_TENANT_ID), FOREIGN KEY (REG_COMMENT_ID,REG_TENANT_ID) REFERENCES REG_COMMENT (REG_ID,REG_TENANT_ID),
REG_TENANT_ID INTEGER DEFAULT 0) Error report - ORA-00942: table or view does not exist

  1. 00000 - "table or view does not exist" Cause:
    Action:

Error starting at line : 170 in command - CREATE INDEX REG_RES_COMM_BY_PATH_ID ON REG_RESOURCE_COMMENT(REG_PATH_ID, REG_RESOURCE_NAME, REG_TENANT_ID) Error report - ORA-00942: table or view does not exist

  1. 00000 - "table or view does not exist" Cause:
    Action:

Error starting at line : 172 in command - CREATE INDEX REG_RES_COMM_BY_VERSION ON REG_RESOURCE_COMMENT(REG_VERSION, REG_TENANT_ID) Error report - ORA-00942: table or view does not exist

  1. 00000 - "table or view does not exist" Cause:
    Action:

Error starting at line : 194 in command - CREATE TABLE REG_RESOURCE_RATING ( REG_RATING_ID INTEGER NOT NULL, REG_VERSION INTEGER, REG_PATH_ID INTEGER, REG_RESOURCE_NAME VARCHAR2(256), FOREIGN KEY (REG_PATH_ID,REG_TENANT_ID) REFERENCES REG_PATH (REG_PATH_ID,REG_TENANT_ID), FOREIGN KEY (REG_RATING_ID,REG_TENANT_ID) REFERENCES REG_RATING (REG_ID,REG_TENANT_ID),
REG_TENANT_ID INTEGER DEFAULT 0) Error report - ORA-00942: table or view does not exist

  1. 00000 - "table or view does not exist" Cause:
    Action:

Error starting at line : 203 in command - CREATE INDEX REG_RATING_IND_BY_PATH_ID ON REG_RESOURCE_RATING(REG_PATH_ID, REG_RESOURCE_NAME, REG_TENANT_ID) Error report - ORA-00942: table or view does not exist

  1. 00000 - "table or view does not exist" Cause:
    Action:

Error starting at line : 205 in command - CREATE INDEX REG_RATING_IND_BY_VERSION ON REG_RESOURCE_RATING(REG_VERSION, REG_TENANT_ID) Error report - ORA-00942: table or view does not exist

  1. 00000 - "table or view does not exist" Cause:
    Action: Error starting at line : 228 in command - CREATE TABLE REG_RESOURCE_TAG ( REG_TAG_ID INTEGER NOT NULL, REG_VERSION INTEGER, REG_PATH_ID INTEGER, REG_RESOURCE_NAME VARCHAR2(256), FOREIGN KEY (REG_PATH_ID,REG_TENANT_ID) REFERENCES REG_PATH (REG_PATH_ID,REG_TENANT_ID), FOREIGN KEY (REG_TAG_ID,REG_TENANT_ID) REFERENCES REG_TAG (REG_ID,REG_TENANT_ID),
    REG_TENANT_ID INTEGER DEFAULT 0) Error report - ORA-00942: table or view does not exist
  2. 00000 - "table or view does not exist" Cause:
    Action:

Error starting at line : 237 in command - CREATE INDEX REG_TAG_IND_BY_PATH_ID ON REG_RESOURCE_TAG(REG_PATH_ID, REG_RESOURCE_NAME, REG_TENANT_ID) Error report - ORA-00942: table or view does not exist

  1. 00000 - "table or view does not exist" Cause:
    Action:

Error starting at line : 239 in command - CREATE INDEX REG_TAG_IND_BY_VERSION ON REG_RESOURCE_TAG(REG_VERSION, REG_TENANT_ID) Error report - ORA-00942: table or view does not exist

  1. 00000 - "table or view does not exist" Cause:
    Action: Error starting at line : 228 in command - CREATE TABLE REG_RESOURCE_TAG ( REG_TAG_ID INTEGER NOT NULL, REG_VERSION INTEGER, REG_PATH_ID INTEGER, REG_RESOURCE_NAME VARCHAR2(256), FOREIGN KEY (REG_PATH_ID,REG_TENANT_ID) REFERENCES REG_PATH (REG_PATH_ID,REG_TENANT_ID), FOREIGN KEY (REG_TAG_ID,REG_TENANT_ID) REFERENCES REG_TAG (REG_ID,REG_TENANT_ID),
    REG_TENANT_ID INTEGER DEFAULT 0) Error report - ORA-00942: table or view does not exist
  2. 00000 - "table or view does not exist" Cause:
    Action:

Error starting at line : 237 in command - CREATE INDEX REG_TAG_IND_BY_PATH_ID ON REG_RESOURCE_TAG(REG_PATH_ID, REG_RESOURCE_NAME, REG_TENANT_ID) Error report - ORA-00942: table or view does not exist

  1. 00000 - "table or view does not exist" Cause:
    Action:

Error starting at line : 239 in command - CREATE INDEX REG_TAG_IND_BY_VERSION ON REG_RESOURCE_TAG(REG_VERSION, REG_TENANT_ID) Error report - ORA-00942: table or view does not exist

  1. 00000 - "table or view does not exist" Cause:
    Action:
NilukaSripalim commented 5 years ago

PR Merged,