TB worker 任务设置相关sql脚本

本文详细介绍了TB worker任务中涉及的SQL脚本设置,包括如何创建、管理和优化这些脚本,以实现高效的数据处理和任务执行。
摘要由CSDN通过智能技术生成
CREATE SMALLFILE TABLESPACE "TMS_WORK" DATAFILE 'D:\APP\YFLIJIE\ORADATA\ORCL\MS_WORK' SIZE 100M LOGGING EXTENT MANAGEMENT LOCAL SEGMENT SPACE MANAGEMENT AUTO

create table PAMIRS_SCHEDULE_QUEUE
(
  id             NUMBER not null,
  task_type       VARCHAR2(50) not null,
  queue_id       VARCHAR2(50) not null,
  own_sign       VARCHAR2(50) not null,
  base_task_type VARCHAR2(50),
  cur_server     VARCHAR2(100),
  req_server     VARCHAR2(100),
  gmt_create     DATE not null,
  gmt_modified   DATE not null
)
tablespace TMS_WORK
  pctfree 10
  initrans 1
  maxtrans 255
  storage
  (
    initial 64K
    next 1M
    minextents 1
    maxextents unlimited
  );
comment on table PAMIRS_SCHEDULE_QUEUE
  is '调度队列';
comment on column PAMIRS_SCHEDULE_QUEUE.id
  is '主键ID';
comment on column PAMIRS_SCHEDULE_QUEUE.task_type
  is '任务类型,由BASE_TASK_TYPE-OWN_SIGN构成,如果是BASE,则是BASE_TASK_TYPE';
comment on column PAMIRS_SCHEDULE_QUEUE.queue_id
  is '任务队列编号';
comment on column PAMIRS_SCHEDULE_QUEUE.own_sign
  is '环境,例如 开发、测试、预发、线上。缺省BASE,2.0版本新增';
comment on column PAMIRS_SCHEDULE_QUEUE.base_task_type
  is '基础任务类型,2.0版本新增';
comment on column PAMIRS_SCHEDULE_QUEUE.cur_server
  is '当前持有的调度服务器';
comment on column PAMIRS_SCHEDULE_QUEUE.req_server
  is '请求调度的服务器';
comment on column PAMIRS_SCHEDULE_QUEUE.gmt_create
  is '创建时间';
comment on column PAMIRS_SCHEDULE_QUEUE.gmt_modified
  is '修改时间';
create unique index IND_PAMIRS_SCHEDULE_QUEUEID on PAMIRS_SCHEDULE_QUEUE (TASK_TYPE, QUEUE_ID, OWN_SIGN)
  tablespace TMS_WORK
  pctfree 10
  initrans 2
  maxtrans 255
  storage
  (
    initial 64K
    next 1M
    minextents 1
    maxextents unlimited
  );
alter table PAMIRS_SCHEDULE_QUEUE
  add constraint PK_PAMIRS_SCHEDULE_QUEUE primary key (ID)
  using index 
  tablespace TMS_WORK
  pctfree 10
  initrans 2
  maxtrans 255
  storage
  (
    initial 64K
    next 1M
    minextents 1
    maxextents unlimited
  );


create table PAMIRS_SCHEDULE_SERVER
(
  id                   NUMBER not null,
  uuid                 VARCHAR2(100) not null,
  task_type           VARCHAR2(50) not null,
  own_sign             VARCHAR2(50) not null,
  base_task_type       VARCHAR2(50) not null,
  ip                   VARCHAR2(50) not null,
  host_name           VARCHAR2(50) not null,
  manager_port         NUMBER not null,
  thread_num           NUMBER not null,
  register_time       DATE not null,
  heartbeat_time       DATE not null,
  version             NUMBER not null,
  jmx_url             VARCHAR2(200),
  dealinfo_desc       VARCHAR2(1000),
  next_run_start_time VARCHAR2(100),
  next_run_end_time   VARCHAR2(100),
  gmt_create           DATE not null,
  gmt_modified         DATE not null
)
tablespace TMS_WORK
  pctfree 10
  initrans 1
  maxtrans 255
  storage
  (
    initial 64K
    next 1M
    minextents 1
    maxextents unlimited
  );
comment on table PAMIRS_SCHEDULE_SERVER
  is '调度服务器';
comment on column PAMIRS_SCHEDULE_SERVER.id
  is '主键ID';
comment on column PAMIRS_SCHEDULE_SERVER.uuid
  is '调度服务器唯一编号';
comment on column PAMIRS_SCHEDULE_SERVER.task_type
  is '任务类型。由BASE_TASK_TYPE-OWN_SIGN构成,如果是BASE,则是BASE_TASK_TYPE
评论
添加红包

请填写红包祝福语或标题

红包个数最小为10个

红包金额最低5元

当前余额3.43前往充值 >
需支付:10.00
成就一亿技术人!
领取后你会自动成为博主和红包主的粉丝 规则
hope_wisdom
发出的红包
实付
使用余额支付
点击重新获取
扫码支付
钱包余额 0

抵扣说明:

1.余额是钱包充值的虚拟货币,按照1:1的比例进行支付金额的抵扣。
2.余额无法直接购买下载,可以购买VIP、付费专栏及课程。

余额充值