CREATE SCHEMA PUBLIC AUTHORIZATION DBA
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 HILOSEQUENCES(SEQUENCENAME VARCHAR(50) NOT NULL,HIGHVALUES INTEGER NOT NULL,CONSTRAINT HILO_PK PRIMARY KEY(SEQUENCENAME))
CREATE MEMORY TABLE JBM_DUAL(DUMMY INTEGER NOT NULL PRIMARY KEY)
CREATE MEMORY TABLE JBM_MSG_REF(MESSAGE_ID BIGINT NOT NULL,CHANNEL_ID BIGINT NOT NULL,TRANSACTION_ID BIGINT,STATE CHAR(1),ORD BIGINT,PAGE_ORD BIGINT,DELIVERY_COUNT INTEGER,SCHED_DELIVERY BIGINT,PRIMARY KEY(MESSAGE_ID,CHANNEL_ID))
CREATE INDEX JBM_MSG_REF_TX ON JBM_MSG_REF(TRANSACTION_ID,STATE)
CREATE MEMORY TABLE JBM_MSG(MESSAGE_ID BIGINT NOT NULL PRIMARY KEY,RELIABLE CHAR(1),EXPIRATION BIGINT,TIMESTAMP BIGINT,PRIORITY TINYINT,TYPE TINYINT,HEADERS LONGVARBINARY,PAYLOAD LONGVARBINARY)
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_ID_CACHE(NODE_ID INTEGER NOT NULL,CNTR INTEGER NOT NULL,JBM_ID VARCHAR(255),PRIMARY KEY(NODE_ID,CNTR))
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 TIMERS(TIMERID VARCHAR(80) NOT NULL,TARGETID VARCHAR(250) NOT NULL,INITIALDATE TIMESTAMP NOT NULL,TIMERINTERVAL BIGINT,INSTANCEPK VARBINARY,INFO VARBINARY,CONSTRAINT TIMERS_PK PRIMARY KEY(TIMERID,TARGETID))
CREATE MEMORY TABLE SLEE_PEAAV_ADDRESSPROFILECMP_167136107ADDRESSES(ID BIGINT GENERATED BY DEFAULT AS IDENTITY(START WITH 1) NOT NULL PRIMARY KEY,SERIALIZABLE VARBINARY(512),STRING VARCHAR(255),OWNER_PROFILENAME VARCHAR(255) NOT NULL,OWNER_TABLENAME VARCHAR(255) NOT NULL,CONSTRAINT SYS_CT_67 UNIQUE(OWNER_TABLENAME,STRING))
CREATE MEMORY TABLE SLEE_PE_ADDRESSPROFILECMP_167136107(PROFILENAME VARCHAR(255) NOT NULL,TABLENAME VARCHAR(255) NOT NULL,PRIMARY KEY(PROFILENAME,TABLENAME))
CREATE MEMORY TABLE JAINSLEEPROFILETABLES(PROFILETABLENAME VARCHAR(255) NOT NULL PRIMARY KEY,PROFILESPECID VARBINARY(512))
CREATE MEMORY TABLE SLEE_PE_ADDRESSPROFILE11CMP_152456043(PROFILENAME VARCHAR(255) NOT NULL,TABLENAME VARCHAR(255) NOT NULL,CADDRESS VARBINARY(512),PRIMARY KEY(PROFILENAME,TABLENAME),CONSTRAINT SYS_CT_77 UNIQUE(CADDRESS,TABLENAME))
CREATE MEMORY TABLE SLEE_PE_RESOURCEINFOPROFILECMP_1974387886(PROFILENAME VARCHAR(255) NOT NULL,TABLENAME VARCHAR(255) NOT NULL,CINFO VARCHAR(255),PRIMARY KEY(PROFILENAME,TABLENAME))
CREATE MEMORY TABLE USSD_GW_CDRS(ID VARCHAR(150) NOT NULL,L_SPC INTEGER,L_SSN SMALLINT,L_RI SMALLINT,L_GT_I SMALLINT,L_GT_DIGITS VARCHAR(18),R_SPC INTEGER,R_SSN SMALLINT,R_RI SMALLINT,R_GT_I SMALLINT,R_GT_DIGITS VARCHAR(18),SERVICE_CODE VARCHAR(10),OR_NATURE SMALLINT,OR_PLAN SMALLINT,OR_DIGITS VARCHAR(18),DE_NATURE SMALLINT,DE_PLAN SMALLINT,DE_DIGITS VARCHAR(18),ISDN_NATURE SMALLINT,ISDN_PLAN SMALLINT,ISDN_DIGITS VARCHAR(18),VLR_NATURE SMALLINT,VLR_PLAN SMALLINT,VLR_DIGITS VARCHAR(18),IMSI VARCHAR(100),TERMINATE_REASON VARCHAR(60),TSTAMP TIMESTAMP NOT NULL,DIALOG_ID BIGINT,PRIMARY KEY(ID,TSTAMP))
ALTER TABLE SLEE_PEAAV_ADDRESSPROFILECMP_167136107ADDRESSES ADD CONSTRAINT FKC2CF5BDED03DFEFA FOREIGN KEY(OWNER_PROFILENAME,OWNER_TABLENAME) REFERENCES SLEE_PE_ADDRESSPROFILECMP_167136107(PROFILENAME,TABLENAME)
ALTER TABLE SLEE_PEAAV_ADDRESSPROFILECMP_167136107ADDRESSES ALTER COLUMN ID RESTART WITH 1
CREATE USER SA PASSWORD ""
GRANT DBA TO SA
SET WRITE_DELAY 10
SET SCHEMA PUBLIC
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 HILOSEQUENCES VALUES('general',0)
INSERT INTO JBM_DUAL VALUES(1)
INSERT INTO JBM_COUNTER VALUES('CHANNEL_ID',170)
INSERT INTO JBM_COUNTER VALUES('MESSAGE_ID',69632)
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')
