ALTER SESSION SET NLS_LENGTH_SEMANTICS=CHAR;
CREATE TABLE S_NQ_JOB
(
JOB_ID NUMBER(10,0) not null,
NAME VARCHAR2(50),
DESC_TEXT VARCHAR2(255),
SCRIPT_TYPE VARCHAR2(20),
SCRIPT VARCHAR2(255),
MAX_RUNTIME_MS NUMBER(10,0),
USER_ID VARCHAR2(128),
NEXT_RUNTIME_TS DATE,
LAST_RUNTIME_TS DATE,
MAX_CNCURRENT_INST NUMBER(10,0),
BEGIN_YEAR NUMBER(10,0),
BEGIN_MONTH NUMBER(10,0),
BEGIN_DAY NUMBER(10,0),
END_YEAR NUMBER(10,0),
END_MONTH NUMBER(10,0),
END_DAY NUMBER(10,0),
START_HOUR NUMBER(10,0),
START_MINUTE NUMBER(10,0),
END_HOUR NUMBER(10,0),
END_MINUTE NUMBER(10,0),
INTERVAL_MINUTE NUMBER(10,0),
TRIGGER_TYPE NUMBER(10,0),
TRIGGER_DAY_INT NUMBER(10,0),
TRIGGER_WEEK_INT NUMBER(10,0),
TRIGGER_RANGE_DOW NUMBER(10,0),
TRIGGER_RANGE_DOM NUMBER(10,0),
TRIGGER_RANGE_MTH NUMBER(10,0),
TRIG_RANGE_DAY_OCC NUMBER(10,0),
DELETE_DONE_FLG NUMBER(10,0) not null,
DISABLE_FLG NUMBER(10,0) not null,
HAS_END_DT_FLG NUMBER(10,0) not null,
EXEC_WHEN_MISS_FLG NUMBER(10,0) not null,
DEL_SCPT_DONE_FLG NUMBER(10,0) not null,
PATH_IN_SCPT_FLG NUMBER(10,0) not null,
ISUSER_SCPT_FLG NUMBER(10,0) not null,
DELETE_FLG NUMBER(10,0) not null,
TZ_NAME VARCHAR2(100)
);
CREATE TABLE S_NQ_JOB
(
JOB_ID NUMBER(10,0) not null,
NAME VARCHAR2(50),
DESC_TEXT VARCHAR2(255),
SCRIPT_TYPE VARCHAR2(20),
SCRIPT VARCHAR2(255),
MAX_RUNTIME_MS NUMBER(10,0),
USER_ID VARCHAR2(128),
NEXT_RUNTIME_TS DATE,
LAST_RUNTIME_TS DATE,
MAX_CNCURRENT_INST NUMBER(10,0),
BEGIN_YEAR NUMBER(10,0),
BEGIN_MONTH NUMBER(10,0),
BEGIN_DAY NUMBER(10,0),
END_YEAR NUMBER(10,0),
END_MONTH NUMBER(10,0),
END_DAY NUMBER(10,0),
START_HOUR NUMBER(10,0),
START_MINUTE NUMBER(10,0),
END_HOUR NUMBER(10,0),
END_MINUTE NUMBER(10,0),
INTERVAL_MINUTE NUMBER(10,0),
TRIGGER_TYPE NUMBER(10,0),
TRIGGER_DAY_INT NUMBER(10,0),
TRIGGER_WEEK_INT NUMBER(10,0),
TRIGGER_RANGE_DOW NUMBER(10,0),
TRIGGER_RANGE_DOM NUMBER(10,0),
TRIGGER_RANGE_MTH NUMBER(10,0),
TRIG_RANGE_DAY_OCC NUMBER(10,0),
DELETE_DONE_FLG NUMBER(10,0) not null,
DISABLE_FLG NUMBER(10,0) not null,
HAS_END_DT_FLG NUMBER(10,0) not null,
EXEC_WHEN_MISS_FLG NUMBER(10,0) not null,
DEL_SCPT_DONE_FLG NUMBER(10,0) not null,
PATH_IN_SCPT_FLG NUMBER(10,0) not null,
ISUSER_SCPT_FLG NUMBER(10,0) not null,
DELETE_FLG NUMBER(10,0) not null,
TZ_NAME VARCHAR2(100)
);
create unique index S_NQ_JOB_P1 on S_NQ_JOB
(JOB_ID);
(JOB_ID);
create index S_NQ_JOB_M1 on S_NQ_JOB
(NEXT_RUNTIME_TS);
(NEXT_RUNTIME_TS);
create index S_NQ_JOB_M2 on S_NQ_JOB
(USER_ID);
CREATE TABLE S_NQ_JOB_PARAM
(
JOB_ID NUMBER(10,0) not null,
RELATIVE_ORDER NUMBER(10,0) not null,
JOB_PARAM VARCHAR2(255),
DELETE_FLG NUMBER(10,0) not null
);
CREATE TABLE S_NQ_INSTANCE
(
JOB_ID NUMBER(10,0) not null,
INSTANCE_ID NUMBER(20,0) not null,
STATUS NUMBER(10,0),
BEGIN_TS DATE,
END_TS DATE,
EXIT_CODE NUMBER(10,0),
DELETE_FLG NUMBER(10,0) not null,
ERROR_MSG_FLG NUMBER(10,0) not null
);
(USER_ID);
CREATE TABLE S_NQ_JOB_PARAM
(
JOB_ID NUMBER(10,0) not null,
RELATIVE_ORDER NUMBER(10,0) not null,
JOB_PARAM VARCHAR2(255),
DELETE_FLG NUMBER(10,0) not null
);
CREATE TABLE S_NQ_INSTANCE
(
JOB_ID NUMBER(10,0) not null,
INSTANCE_ID NUMBER(20,0) not null,
STATUS NUMBER(10,0),
BEGIN_TS DATE,
END_TS DATE,
EXIT_CODE NUMBER(10,0),
DELETE_FLG NUMBER(10,0) not null,
ERROR_MSG_FLG NUMBER(10,0) not null
);
create unique index S_NQ_INSTANCE_U1 on S_NQ_INSTANCE
(JOB_ID,INSTANCE_ID);
CREATE INDEX S_NQ_INSTANCE_M1 ON S_NQ_INSTANCE (END_TS, STATUS, INSTANCE_ID);
CREATE INDEX S_NQ_INSTANCE_M2 ON S_NQ_INSTANCE (BEGIN_TS, STATUS, INSTANCE_ID);
CREATE INDEX S_NQ_INSTANCE_M3 ON S_NQ_INSTANCE (INSTANCE_ID, DELETE_FLG);
CREATE INDEX S_NQ_INSTANCE_M4 ON S_NQ_INSTANCE (JOB_ID, INSTANCE_ID, STATUS, DELETE_FLG);
CREATE INDEX S_NQ_INSTANCE_M5 ON S_NQ_INSTANCE (STATUS, DELETE_FLG);
CREATE TABLE S_NQ_ERR_MSG
(
JOB_ID NUMBER(10,0) not null,
INSTANCE_ID NUMBER(20,0) not null,
RELATIVE_ORDER NUMBER(10,0) not null,
ERROR_MSG_TEXT VARCHAR2(255),
DELETE_FLG NUMBER(10,0) not null
);
(JOB_ID,INSTANCE_ID);
CREATE INDEX S_NQ_INSTANCE_M1 ON S_NQ_INSTANCE (END_TS, STATUS, INSTANCE_ID);
CREATE INDEX S_NQ_INSTANCE_M2 ON S_NQ_INSTANCE (BEGIN_TS, STATUS, INSTANCE_ID);
CREATE INDEX S_NQ_INSTANCE_M3 ON S_NQ_INSTANCE (INSTANCE_ID, DELETE_FLG);
CREATE INDEX S_NQ_INSTANCE_M4 ON S_NQ_INSTANCE (JOB_ID, INSTANCE_ID, STATUS, DELETE_FLG);
CREATE INDEX S_NQ_INSTANCE_M5 ON S_NQ_INSTANCE (STATUS, DELETE_FLG);
CREATE TABLE S_NQ_ERR_MSG
(
JOB_ID NUMBER(10,0) not null,
INSTANCE_ID NUMBER(20,0) not null,
RELATIVE_ORDER NUMBER(10,0) not null,
ERROR_MSG_TEXT VARCHAR2(255),
DELETE_FLG NUMBER(10,0) not null
);
create unique index S_NQ_ERR_MSG_U1 on S_NQ_ERR_MSG
(JOB_ID,INSTANCE_ID,RELATIVE_ORDER);
CREATE INDEX S_NQ_ERR_MSG_F1 ON S_NQ_ERR_MSG (INSTANCE_ID);
(JOB_ID,INSTANCE_ID,RELATIVE_ORDER);
CREATE INDEX S_NQ_ERR_MSG_F1 ON S_NQ_ERR_MSG (INSTANCE_ID);
commit;
No comments:
Post a Comment