You can not select more than 25 topics Topics must start with a chinese character,a letter or number, can include dashes ('-') and can be up to 35 characters long.

tables_db2.sql 4.8 kB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101102103104105106107108109110111112113114115116117118119120121122123124125126127128129130131132133134135136137138139140141142143144145146147148
  1. #
  2. # Thanks to Horia Muntean for submitting this....
  3. #
  4. # .. known to work with DB2 7.1 and the JDBC driver "COM.ibm.db2.jdbc.net.DB2Driver"
  5. # .. likely to work with others...
  6. #
  7. # In your Quartz properties file, you'll need to set
  8. # org.quartz.jobStore.driverDelegateClass = org.quartz.impl.jdbcjobstore.StdJDBCDelegate
  9. #
  10. # If you're using DB2 6.x you'll want to set this property to
  11. # org.quartz.jobStore.driverDelegateClass = org.quartz.impl.jdbcjobstore.DB2v6Delegate
  12. #
  13. # Note that the blob column size (e.g. blob(2000)) dictates theount of data that can be stored in
  14. # that blob - i.e. limits theount of data you can put into your JobDataMap
  15. #
  16. create table qrtz_job_details (
  17. sched_name varchar(120) not null,
  18. job_name varchar(80) not null,
  19. job_group varchar(80) not null,
  20. description varchar(120) null,
  21. job_class_name varchar(128) not null,
  22. is_durable varchar(1) not null,
  23. is_nonconcurrent varchar(1) not null,
  24. is_update_data varchar(1) not null,
  25. requests_recovery varchar(1) not null,
  26. job_data blob(2000),
  27. primary key (sched_name,job_name,job_group)
  28. )
  29. create table qrtz_triggers(
  30. sched_name varchar(120) not null,
  31. trigger_name varchar(80) not null,
  32. trigger_group varchar(80) not null,
  33. job_name varchar(80) not null,
  34. job_group varchar(80) not null,
  35. description varchar(120) null,
  36. next_fire_time bigint,
  37. prev_fire_time bigint,
  38. priority integer,
  39. trigger_state varchar(16) not null,
  40. trigger_type varchar(8) not null,
  41. start_time bigint not null,
  42. end_time bigint,
  43. calendar_name varchar(80),
  44. misfire_instr smallint,
  45. job_data blob(2000),
  46. primary key (sched_name,trigger_name,trigger_group),
  47. foreign key (sched_name,job_name,job_group) references qrtz_job_details(sched_name,job_name,job_group)
  48. )
  49. create table qrtz_simple_triggers(
  50. sched_name varchar(120) not null,
  51. trigger_name varchar(80) not null,
  52. trigger_group varchar(80) not null,
  53. repeat_count bigint not null,
  54. repeat_interval bigint not null,
  55. times_triggered bigint not null,
  56. primary key (sched_name,trigger_name,trigger_group),
  57. foreign key (sched_name,trigger_name,trigger_group) references qrtz_triggers(sched_name,trigger_name,trigger_group)
  58. )
  59. create table qrtz_cron_triggers(
  60. sched_name varchar(120) not null,
  61. trigger_name varchar(80) not null,
  62. trigger_group varchar(80) not null,
  63. cron_expression varchar(120) not null,
  64. time_zone_id varchar(80),
  65. primary key (sched_name,trigger_name,trigger_group),
  66. foreign key (sched_name,trigger_name,trigger_group) references qrtz_triggers(sched_name,trigger_name,trigger_group)
  67. )
  68. CREATE TABLE qrtz_simprop_triggers
  69. (
  70. sched_name varchar(120) not null,
  71. TRIGGER_NAME VARCHAR(200) NOT NULL,
  72. TRIGGER_GROUP VARCHAR(200) NOT NULL,
  73. STR_PROP_1 VARCHAR(512) NULL,
  74. STR_PROP_2 VARCHAR(512) NULL,
  75. STR_PROP_3 VARCHAR(512) NULL,
  76. INT_PROP_1 INT NULL,
  77. INT_PROP_2 INT NULL,
  78. LONG_PROP_1 BIGINT NULL,
  79. LONG_PROP_2 BIGINT NULL,
  80. DEC_PROP_1 NUMERIC(13,4) NULL,
  81. DEC_PROP_2 NUMERIC(13,4) NULL,
  82. BOOL_PROP_1 VARCHAR(1) NULL,
  83. BOOL_PROP_2 VARCHAR(1) NULL,
  84. PRIMARY KEY (sched_name,TRIGGER_NAME,TRIGGER_GROUP),
  85. FOREIGN KEY (sched_name,TRIGGER_NAME,TRIGGER_GROUP)
  86. REFERENCES QRTZ_TRIGGERS(sched_name,TRIGGER_NAME,TRIGGER_GROUP)
  87. )
  88. create table qrtz_blob_triggers(
  89. sched_name varchar(120) not null,
  90. trigger_name varchar(80) not null,
  91. trigger_group varchar(80) not null,
  92. blob_data blob(2000) null,
  93. primary key (sched_name,trigger_name,trigger_group),
  94. foreign key (sched_name,trigger_name,trigger_group) references qrtz_triggers(sched_name,trigger_name,trigger_group)
  95. )
  96. create table qrtz_calendars(
  97. sched_name varchar(120) not null,
  98. calendar_name varchar(80) not null,
  99. calendar blob(2000) not null,
  100. primary key (sched_name,calendar_name)
  101. )
  102. create table qrtz_fired_triggers(
  103. sched_name varchar(120) not null,
  104. entry_id varchar(95) not null,
  105. trigger_name varchar(80) not null,
  106. trigger_group varchar(80) not null,
  107. instance_name varchar(80) not null,
  108. fired_time bigint not null,
  109. sched_time bigint not null,
  110. priority integer not null,
  111. state varchar(16) not null,
  112. job_name varchar(80) null,
  113. job_group varchar(80) null,
  114. is_nonconcurrent varchar(1) null,
  115. requests_recovery varchar(1) null,
  116. primary key (sched_name,entry_id)
  117. );
  118. create table qrtz_paused_trigger_grps(
  119. sched_name varchar(120) not null,
  120. trigger_group varchar(80) not null,
  121. primary key (sched_name,trigger_group)
  122. );
  123. create table qrtz_scheduler_state (
  124. sched_name varchar(120) not null,
  125. instance_name varchar(80) not null,
  126. last_checkin_time bigint not null,
  127. checkin_interval bigint not null,
  128. primary key (sched_name,instance_name)
  129. );
  130. create table qrtz_locks
  131. (
  132. sched_name varchar(120) not null,
  133. lock_name varchar(40) not null,
  134. primary key (sched_name,lock_name)
  135. );