localDB.script
3.07 KB
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
CREATE SCHEMA PUBLIC AUTHORIZATION DBA
CREATE MEMORY TABLE JBM_DUAL(DUMMY INTEGER)
CREATE MEMORY TABLE JBM_MSG_REF(CHANNEL_ID BIGINT NOT NULL,MESSAGE_ID BIGINT NOT NULL,TRANSACTION_ID BIGINT,STATE CHAR(1),ORD BIGINT,PAGE_ORD BIGINT,DELIVERY_COUNT INTEGER,SCHED_DELIVERY BIGINT,PRIMARY KEY(CHANNEL_ID,MESSAGE_ID))
CREATE INDEX JBM_MSG_REF_TX ON JBM_MSG_REF(TRANSACTION_ID)
CREATE INDEX JBM_MSG_REF_ORD ON JBM_MSG_REF(ORD)
CREATE INDEX JBM_MSG_REF__PAGE_ORD ON JBM_MSG_REF(PAGE_ORD)
CREATE INDEX JBM_MSG_REF_MESSAGE_ID ON JBM_MSG_REF(MESSAGE_ID)
CREATE INDEX JBM_MSG_REF_SCHED_DELIVERY ON JBM_MSG_REF(SCHED_DELIVERY)
CREATE MEMORY TABLE JBM_MSG(MESSAGE_ID BIGINT NOT NULL PRIMARY KEY,RELIABLE CHAR(1),EXPIRATION BIGINT,TIMESTAMP BIGINT,PRIORITY TINYINT,TYPE TINYINT,INS_TIME BIGINT,HEADERS LONGVARBINARY,PAYLOAD LONGVARBINARY)
CREATE INDEX JBM_MSG_REF_TIMESTAMP ON JBM_MSG(TIMESTAMP)
CREATE MEMORY TABLE JBM_TX(NODE_ID INTEGER,TRANSACTION_ID BIGINT NOT NULL PRIMARY KEY,BRANCH_QUAL VARBINARY(254),FORMAT_ID INTEGER,GLOBAL_TXID VARBINARY(254))
CREATE MEMORY TABLE JBM_COUNTER(NAME VARCHAR(255) NOT NULL PRIMARY KEY,NEXT_ID BIGINT)
CREATE MEMORY TABLE JBM_USER(USER_ID VARCHAR(32) NOT NULL PRIMARY KEY,PASSWD VARCHAR(32) NOT NULL,CLIENTID VARCHAR(128))
CREATE MEMORY TABLE JBM_ROLE(ROLE_ID VARCHAR(32) NOT NULL,USER_ID VARCHAR(32) NOT NULL,PRIMARY KEY(USER_ID,ROLE_ID))
CREATE MEMORY TABLE JBM_POSTOFFICE(POSTOFFICE_NAME VARCHAR(255) NOT NULL,NODE_ID INTEGER NOT NULL,QUEUE_NAME VARCHAR(255) NOT NULL,CONDITION VARCHAR(1023),SELECTOR VARCHAR(1023),CHANNEL_ID BIGINT,CLUSTERED CHAR(1),ALL_NODES CHAR(1),PRIMARY KEY(POSTOFFICE_NAME,NODE_ID,QUEUE_NAME))
CREATE MEMORY TABLE TAG(ID BIGINT GENERATED BY DEFAULT AS IDENTITY(START WITH 1) NOT NULL PRIMARY KEY,NAME VARCHAR(20) NOT NULL,VERSION INTEGER)
ALTER TABLE TAG ALTER COLUMN ID RESTART WITH 2
CREATE USER SA PASSWORD ""
GRANT DBA TO SA
SET WRITE_DELAY 10
SET SCHEMA PUBLIC
INSERT INTO JBM_DUAL VALUES(1)
INSERT INTO JBM_DUAL VALUES(1)
INSERT INTO JBM_DUAL VALUES(1)
INSERT INTO JBM_DUAL VALUES(1)
INSERT INTO JBM_COUNTER VALUES('CHANNEL_ID',40)
INSERT INTO JBM_COUNTER VALUES('MESSAGE_ID',16384)
INSERT INTO JBM_COUNTER VALUES('TRANSACTION_ID',4096)
INSERT INTO JBM_USER VALUES('dynsub','dynsub',NULL)
INSERT INTO JBM_USER VALUES('guest','guest',NULL)
INSERT INTO JBM_USER VALUES('j2ee','j2ee',NULL)
INSERT INTO JBM_USER VALUES('john','needle','DurableSubscriberExample')
INSERT INTO JBM_USER VALUES('nobody','nobody',NULL)
INSERT INTO JBM_ROLE VALUES('durpublisher','dynsub')
INSERT INTO JBM_ROLE VALUES('publisher','dynsub')
INSERT INTO JBM_ROLE VALUES('guest','guest')
INSERT INTO JBM_ROLE VALUES('j2ee','guest')
INSERT INTO JBM_ROLE VALUES('john','guest')
INSERT INTO JBM_ROLE VALUES('durpublisher','john')
INSERT INTO JBM_ROLE VALUES('publisher','john')
INSERT INTO JBM_ROLE VALUES('subscriber','john')
INSERT INTO JBM_ROLE VALUES('noacc','nobody')
INSERT INTO JBM_POSTOFFICE VALUES('JMS post office',0,'DLQ','queue.DLQ',NULL,0,'N','N')
INSERT INTO JBM_POSTOFFICE VALUES('JMS post office',0,'ExpiryQueue','queue.ExpiryQueue',NULL,1,'N','N')
INSERT INTO TAG VALUES(1,'My new legal act',0)